Re: pg_resetxlog to clear backup start/end locations. - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: pg_resetxlog to clear backup start/end locations.
Date
Msg-id CAHGQGwE+3MfwSRpcOMBJR4E8iQkwnt6xU7NFC4qKcEAJWo1Djw@mail.gmail.com
Whole thread Raw
In response to pg_resetxlog to clear backup start/end locations.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: pg_resetxlog to clear backup start/end locations.  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On Fri, Jun 13, 2014 at 5:08 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> Hello, this is a patch that add the function to clear backup
> location information to pg_resetxlog.
>
> As per the discussion held before, this function cannot be back
> patched to the older versions than 9.4. And it also slipped over
> 9.4 so proposed in this CF.
>
> This simplly erases the backup location information in pg_control
> written during recovery. This is seen as the output of
> pg_controldata.
>
>  | $ pg_controldata
>  | pg_control version number:            942
>  | Catalog version number:               201406121
>  | ...
> !| Backup start location:                0/0
> !| Backup end location:                  0/0
> !| End-of-backup record required:        no
>  | ...
>
> Under some condition, this values sticks having valid values even
> though the WAL record which indicates the end of backup won't
> come. This option could be used to forcibly finish the blocked
> recovery procedure.

The document about pg_resetxlog needs to be updated.

I think that pg_resetxlog should reset backup locations by default
since they are useless (rather harmful) after pg_resetxlog. Thought?

Regards,

-- 
Fujii Masao



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Proposal for CSN based snapshots
Next
From: Heikki Linnakangas
Date:
Subject: rm_desc signature