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

From Tom Lane
Subject Re: pg_control is missing a field for LOBLKSIZE
Date
Msg-id 27073.1403119726@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_control is missing a field for LOBLKSIZE  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_control is missing a field for LOBLKSIZE  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Wed, Jun 18, 2014 at 2:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The net behavior would be the same, but I thought it might be easier to
>> code by thinking of it this way.  Or maybe it wouldn't --- it's just a
>> suggestion.

> Well, the difference is that if we just don't check it, there can
> never be an error.  Basically, it's the user's job to DTRT.  If we
> check it against some semi-arbitrary value, we'll catch the case where
> the old cluster was modified with a custom setting and the new one was
> not - but couldn't we also get false positives under obscure
> circumstances?

Huh?  What we'd be checking is the LOBLKSIZE compiled into pg_upgrade
versus that stored into pg_control by the new postmaster.  If those
are different, then pg_upgrade didn't come from the same build as the
new postmaster, which is already a pretty hazardous situation (especially
if the user is fooling with low-level stuff like this).
        regards, tom lane



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: idle_in_transaction_timeout
Next
From: Tom Lane
Date:
Subject: Re: idle_in_transaction_timeout