pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: tushar <tushar.ahuja@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_resetwal is broken if run from v10 against older version of PG data directory
Date: Mon, 29 May 2017 13:02:28 -0400
Message-ID: <14189.1496077348@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqSfMCncBr4JdxKkgwqP5J--6czHMoeYzMAjTnCYqXoJog@mail.gmail.com>
References: <f4b8eb91-b934-8a0d-b3cc-68f06e2279d1@enterprisedb.com>
	<CAA4eK1JD_i5P3iRViF601FehMvkCrP=jmuYuV==OsrtFKhNa8A@mail.gmail.com>
	<cd63c926-7601-5b4d-788f-5295c5a9dcc8@enterprisedb.com>
	<CAA4eK1LPHkczLTTsN7rHpxMp0Fee9qyrgBXpRn_sNYVhRga-SQ@mail.gmail.com>
	<11442.1496073654@sss.pgh.pa.us>
	<CAB7nPqSfMCncBr4JdxKkgwqP5J--6czHMoeYzMAjTnCYqXoJog@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Mon, May 29, 2017 at 9:00 AM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (15+ messages)  latest in thread

Message-ID: <14189.1496077348@sss.pgh.pa.us>
Permalink:  ../14189.1496077348@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14189.1496077348@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, amit.kapila16@gmail.com, tushar.ahuja@enterprisedb.com
  Subject: Re: pg_resetwal is broken if run from v10 against older version of PG data directory
  In-Reply-To: <14189.1496077348@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