Re: pg_control is missing a field for LOBLKSIZE - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_control is missing a field for LOBLKSIZE
Date
Msg-id 20140604150305.GC10482@alap3.anarazel.de
Whole thread Raw
In response to pg_control is missing a field for LOBLKSIZE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_control is missing a field for LOBLKSIZE
List pgsql-hackers
On 2014-06-04 10:03:09 -0400, Tom Lane wrote:
> I just chanced to notice that if someone were to change the value for
> LOBLKSIZE and recompile, there'd be nothing to stop him from starting
> that postmaster against an existing database, even though it would
> completely misinterpret and mangle any data in pg_largeobject.
> 
> I think there ought to be a guard for that, for exactly the same reasons
> that we check TOAST_MAX_CHUNK_SIZE: correct interpretation of on-disk
> data requires that this value match the original database configuration.
> 
> Obviously it's too late to do anything about this in existing branches,
> but I propose to add a field to pg_control after we branch off 9.4.

Btw, I had wondered before if we shouldn't also add sizeof(long) to
pg_control to catch cases where a database is copied between a LLP64
(64bit windows) and an LP64 (nearly every other 64bit system) system. I
have my doubts that we're completely clean about the size
difference. Not to speak of extension datatypes.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Alexey Klyukin
Date:
Subject: Could not open file pg_multixact/offsets/ ERROR on 9.3.4
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] Migrating from 9.2.4 to 9.3.0 with XML DOCTYPE