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

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(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 10:19:56
Message-ID: CAA4eK1LPHkczLTTsN7rHpxMp0Fee9qyrgBXpRn_sNYVhRga-SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 29, 2017 at 3:20 PM, tushar <tushar(dot)ahuja(at)enterprisedb(dot)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(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:
>

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Ladhe 2017-05-29 11:13:43 Re: fix side-effect in get_qual_for_list()
Previous Message Amit Kapila 2017-05-29 10:00:47 Re: retry shm attach for windows (WAS: Re: OK, so culicidae is *still* broken)