Re: pg_resetxlog to clear backup start/end locations.

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_resetxlog to clear backup start/end locations.
Date: 2014-06-13 11:27:26
Message-ID: CAHGQGwE+3MfwSRpcOMBJR4E8iQkwnt6xU7NFC4qKcEAJWo1Djw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 13, 2014 at 5:08 PM, Kyotaro HORIGUCHI
<horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-06-13 11:37:33 rm_desc signature
Previous Message Heikki Linnakangas 2014-06-13 10:24:19 Re: Proposal for CSN based snapshots