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

From: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_resetwal is broken if run from v10 against older version of PG data directory
Date: 2017-05-29 09:50:29
Message-ID: cd63c926-7601-5b4d-788f-5295c5a9dcc8@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)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(at)centos-cpula ~]$

--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Ladhe 2017-05-29 09:52:25 Re: Default Partition for Range
Previous Message Amit Langote 2017-05-29 09:45:50 Re: "cannot specify finite value after UNBOUNDED" ... uh, why?