Re: Archive recovery won't be completed on some situation. - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Archive recovery won't be completed on some situation.
Date
Msg-id 5326FFAD.4010100@vmware.com
Whole thread Raw
In response to Re: Archive recovery won't be completed on some situation.  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Archive recovery won't be completed on some situation.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
On 03/15/2014 05:59 PM, Fujii Masao wrote:
> What about adding new option into pg_resetxlog so that we can
> reset the pg_control's backup start location? Even after we've
> accidentally entered into the situation that you described, we can
> exit from that by resetting the backup start location in pg_control.
> Also this option seems helpful to salvage the data as a last resort
> from the corrupted backup.

Yeah, seems reasonable. After you run pg_resetxlog, there's no hope that 
the backup end record would arrive any time later. And if it does, it 
won't really do much good after you've reset the WAL.

We probably should just clear out the backup start/stop location always 
when you run pg_resetxlog. Your database is potentially broken if you 
reset the WAL before reaching consistency, but if forcibly do that with 
"pg_resetxlog -f", you've been warned.

- Heikki



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump without explicit table locking
Next
From: Amit Kapila
Date:
Subject: Re: Patch: show relation and tuple infos of a lock to acquire