Re: [HACKERS] pg_resetwal is broken if run from v10 against olderversion of PG data directory - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] pg_resetwal is broken if run from v10 against olderversion of PG data directory
Date
Msg-id CAA4eK1LPHkczLTTsN7rHpxMp0Fee9qyrgBXpRn_sNYVhRga-SQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_resetwal is broken if run from v10 against olderversion of PG data directory  (tushar <tushar.ahuja@enterprisedb.com>)
Responses Re: [HACKERS] pg_resetwal is broken if run from v10 against olderversion of PG data directory  (Michael Paquier <michael.paquier@gmail.com>)
Re: [HACKERS] pg_resetwal is broken if run from v10 against older version of PG data directory  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, May 29, 2017 at 3:20 PM, tushar <tushar.ahuja@enterprisedb.com> wrote:
> 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:
>

I think this happens due to commit
f82ec32ac30ae7e3ec7c84067192535b2ff8ec0e which renames pg_xlog to
pg_wal.  It does take care of making some of the modules like
pg_basebackup to understand both old and new directory structures, but
not done for all the modules.  I think we should make similar changes
in pg_resetwal or at the very least update the docs to indicate
pg_resetwal can give an error if used against pre-10 data directory.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: retry shm attach for windows (WAS: Re: [HACKERS] OK, so culicidaeis *still* broken)
Next
From: Jeevan Ladhe
Date:
Subject: Re: [HACKERS] fix side-effect in get_qual_for_list()