pg_resetxlog to clear backup start/end locations.

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pg_resetxlog to clear backup start/end locations.
Date: 2014-06-13 08:08:18
Message-ID: 20140613.170818.259505364.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards,

--
Kyotaro Horiguchi
NTT Open Source Software Center

Attachment Content-Type Size
pg_resetxlog_clear_backup_locs_v1.patch text/x-patch 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Quan Zongliang 2014-06-13 08:09:38 Re: PL/pgSQL support to define multi variables once
Previous Message Michael Paquier 2014-06-13 08:00:30 Re: WAL replay bugs