Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bOBx5-0001vF-DL for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 22:51:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bOBx4-0003WM-He for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Jul 2016 22:51:22 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bOBx3-0003W6-Mw for pgsql-hackers@postgresql.org; Fri, 15 Jul 2016 22:51:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bOBx0-0003AK-H7 for pgsql-hackers@postgresql.org; Fri, 15 Jul 2016 22:51:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u6FMpGPS017828; Fri, 15 Jul 2016 18:51:16 -0400 From: Tom Lane To: David Steele cc: Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: Version number for pg_control 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> Comments: In-reply-to Tom Lane message dated "Fri, 15 Jul 2016 18:22:23 -0400" Date: Fri, 15 Jul 2016 18:51:16 -0400 Message-ID: <17827.1468623076@sss.pgh.pa.us> X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org I wrote: > David Steele 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