From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Steele <david@pgmasters.net>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Version number for pg_control
Date: Fri, 15 Jul 2016 18:51:16 -0400
Message-ID: <17827.1468623076@sss.pgh.pa.us> (raw)
In-Reply-To: <16945.1468621343@sss.pgh.pa.us>
References: <20160715214718.GA165879@alvherre.pgsql>
<110f893d-2eda-0c86-ca37-7f1d041be1d1@pgmasters.net>
<16945.1468621343@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> David Steele <david@pgmasters.net> writes:
>> Maybe this would affect pg_controldata or other supporting utilities but
>> the server itself should not be affected since it also checks the
>> catalog version.
> Right, that version number exists mostly for the benefit of pg_controldata
> and allied utilities. You would get a CRC failure in any case when trying
> to go between inconsistent notions of what pg_control contains, but the
> version number is supposed to help you figure out why that happened.
> As things stand, though, it'd only mislead you.
Also notice that the server itself uses that heuristic to try to be
helpful about the reason for a pg_control read failure: it detects
PG_CONTROL_VERSION mismatch first, then checks CRC, then checks catversion
(see ReadControlFile(), which even goes to the trouble of trying to
diagnose endian issues this way). So the users-eye view of the problem
here is that starting a 9.5 or 9.6 server against a 9.4 pg_control file
will tell you that there's a checksum problem, not that the file is the
wrong version.
The value of getting this right was shown only today:
https://www.postgresql.org/message-id/6f746a21-ccfe-d736-57cf-04e3f87fcfa5@wintek.com
where we'd have had a heckuva harder time diagnosing what was up
with a less on-point error message.
Like Alvaro, I was on the fence about whether it is worth changing now;
but this consideration makes me think that it is.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, david@pgmasters.net, alvherre@2ndquadrant.com
Subject: Re: Version number for pg_control
In-Reply-To: <17827.1468623076@sss.pgh.pa.us>
References: <20160715214718.GA165879@alvherre.pgsql> <110f893d-2eda-0c86-ca37-7f1d041be1d1@pgmasters.net> <16945.1468621343@sss.pgh.pa.us> <17827.1468623076@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox