Re: pg_resetwal is broken if run from v10 against older version of PG data directory
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
tushar <tushar.ahuja@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-05-29T16:55:26Z
Lists: pgsql-hackers
Attachments
- resetwal-restrict.patch (application/octet-stream) patch
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. In bad corruption scenarios, if that somehow got corrupted > (which seems unlikely since it's never written to post-initdb), > you could fill in the correct contents by hand and then > pg_resetxlog/pg_resetwal would run. 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. -- Michael
Commits
-
Prevent running pg_resetwal/pg_resetxlog against wrong-version data dirs.
- f3db7f164a29 10.0 landed
- 9ed68f64114e 9.4.13 landed
- 98bff290747e 9.6.4 landed
- 78e4fb8e41df 9.3.18 landed
- 6b48f06da85e 9.2.22 landed
- 5bcbc4cd6d9c 9.5.8 landed
-
Rename "pg_xlog" directory to "pg_wal".
- f82ec32ac30a 10.0 cited