Re: pg_resetwal is broken if run from v10 against older version of PG data directory

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Simon Riggs <simon@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Amit Kapila <amit.kapila16@gmail.com>, tushar <tushar.ahuja@enterprisedb.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-05-30T11:43:18Z
Lists: pgsql-hackers
On Tue, May 30, 2017 at 4:24 AM, Simon Riggs <simon@2ndquadrant.com> wrote:
> Just check the name of the directory so that pg_resetwal will refuse
> to run against pg_xlog directory

That's a strictly weaker integrity check than what Tom already
committed.  That only distinguishes pre-10 from post-10, whereas Tom
linked it to the specific major version, which is better.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Commits

  1. Prevent running pg_resetwal/pg_resetxlog against wrong-version data dirs.

  2. Rename "pg_xlog" directory to "pg_wal".