Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFO5Z-0003BR-Fa for pgsql-hackers@arkaria.postgresql.org; Mon, 29 May 2017 17:04:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFO5Y-0003wq-Kj for pgsql-hackers@arkaria.postgresql.org; Mon, 29 May 2017 17:04:16 +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 1dFO3x-0001E1-3V for pgsql-hackers@postgresql.org; Mon, 29 May 2017 17:02:37 +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 1dFO3q-0003be-Gi for pgsql-hackers@postgresql.org; Mon, 29 May 2017 17:02:35 +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 v4TH2S61014190; Mon, 29 May 2017 13:02:28 -0400 From: Tom Lane To: Michael Paquier cc: Amit Kapila , tushar , PostgreSQL-development Subject: Re: pg_resetwal is broken if run from v10 against older version of PG data directory In-reply-to: References: <11442.1496073654@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Mon, 29 May 2017 09:55:26 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14188.1496077348.1@sss.pgh.pa.us> Date: Mon, 29 May 2017 13:02:28 -0400 Message-ID: <14189.1496077348@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 Michael Paquier writes: > On Mon, May 29, 2017 at 9:00 AM, Tom Lane wrote: >> So we need to prevent this, not try to make it work. I don't think >> we can insist on a version match in pg_control, because part of the >> point of pg_resetxlog/pg_resetwal is to recover if pg_control is >> unreadable. But I think we could look at PG_VERSION, which is only a >> text file. > Agreed. Shouldn't this be back-patched? PG_CONTROL_VERSION has not > been bumped between 9.4 and 9.5. Attached is a patch for HEAD. Yeah, I'm thinking it would be a good idea to enforce this in all branches. Your patch looks sane in a quick once-over, but I didn't test it. 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