Re: Issues with blocksize smaller than 8KB
Álvaro Herrera <alvherre@kurilemu.de>
From: Álvaro Herrera <alvherre@kurilemu.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Casey Shobe <casey.allen.shobe@icloud.com>, pgsql-bugs@lists.postgresql.org
Date: 2025-10-19T18:15:06Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add static assertion that RELSEG_SIZE fits in an int.
- 92cf557ffae4 19 (unreleased) landed
On 2025-Oct-18, Tom Lane wrote:
> > 2025-10-17 15:39:13.182 UTC [97433] DETAIL: The database cluster was initialized with RELSEG_SIZE 1895825408, but the server was compiled with RELSEG_SIZE 1895825408.
> > 2025-10-17 15:39:13.182 UTC [97433] HINT: It looks like you need to recompile or initdb.
>
> I could not reproduce any of these misbehaviors here.
Hmm, but how come two values that print identical result in failing the
test that they are not equal? The involved code is this:
if (ControlFile->relseg_size != RELSEG_SIZE)
ereport(FATAL,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("database files are incompatible with server"),
/* translator: %s is a variable name and %d is its value */
errdetail("The database cluster was initialized with %s %d,"
" but the server was compiled with %s %d.",
"RELSEG_SIZE", ControlFile->relseg_size,
"RELSEG_SIZE", RELSEG_SIZE),
errhint("It looks like you need to recompile or initdb.")));
where ControlFile->relseg_size is uint32 and RELSEG_SIZE is defined in
my pg_config.h as
#define RELSEG_SIZE 131072
which would be a signed quantity ... of what size again? The value 1895825408
should fit in a signed int32 (if snugly). I wonder whether something is
going awry with that.
What sort of platform is this on, anyway?
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/