Hi~ The default relsegsize of PostgreSQL is 1GB so that it can be stored safely in an unsigned int. However, for some Postgres variant which is running on cloud storage, in order not to generate too many files for a relation, the relsegsize will be set to a larger number, which may overflow uint32, if relsegsize is larger than 4GB.
/* Segment size in bytes */
static unsigned int segmentSize = RELSEG_SIZE * BLCKSZ;
I got this warning:
pg_filedump.c:73:47: warning: overflow in expression; result is 0 with type 'int' [-Winteger-overflow]
How about use 64-bit unsigned integer for it?
Hi~ The default relsegsize of PostgreSQL is 1GB so that it can be stored safely in an unsigned int. However, for some Postgres variant which is running on cloud storage, in order not to generate too many files for a relation, the relsegsize will be set to a larger number, which may overflow uint32, if relsegsize is larger than 4GB.
I got this warning:
How about use 64-bit unsigned integer for it?