Re: pg_resetwal is broken if run from v10 against older version of PG data directory
tushar <tushar.ahuja@enterprisedb.com>
From: tushar <tushar.ahuja@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-05-29T09:50:29Z
Lists: pgsql-hackers
On 05/29/2017 03:10 PM, Amit Kapila wrote: > What makes you think above is a valid usage and should > pass? with earlier versions ,for instance - v.96 v/s v9.5 ,pg_resetwal was giving pg_control values . Installed v9.6 and v9.5 and run pg_resetwal of v9.6 against data directory of v9.5. [centos@centos-cpula ~]$ /tmp/pg9.6/bin/pg_resetxlog -D /tmp/pg9.5/bin/data/ pg_resetxlog: pg_control exists but is broken or unknown version; ignoring it Guessed pg_control values: pg_control version number: 960 Catalog version number: 201608131 Database system identifier: 6425491233437069295 Latest checkpoint's TimeLineID: 1 Latest checkpoint's full_page_writes: off Latest checkpoint's NextXID: 0:3 Latest checkpoint's NextOID: 10000 Latest checkpoint's NextMultiXactId: 1 Latest checkpoint's NextMultiOffset: 0 Latest checkpoint's oldestXID: 3 Latest checkpoint's oldestXID's DB: 0 Latest checkpoint's oldestActiveXID: 0 Latest checkpoint's oldestMultiXid: 1 Latest checkpoint's oldestMulti's DB: 0 Latest checkpoint's oldestCommitTsXid:0 Latest checkpoint's newestCommitTsXid:0 Maximum data alignment: 8 Database block size: 8192 Blocks per segment of large relation: 131072 WAL block size: 8192 Bytes per WAL segment: 16777216 Maximum length of identifiers: 64 Maximum columns in an index: 32 Maximum size of a TOAST chunk: 1996 Size of a large-object chunk: 2048 Date/time type storage: 64-bit integers Float4 argument passing: by value Float8 argument passing: by value Data page checksum version: 0 Values to be changed: First log segment after reset: 000000010000000000000002 If these values seem acceptable, use -f to force reset. [centos@centos-cpula ~]$ -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company
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