Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves)

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG: *FF WALs under 9.2 (WAS: .ready files appearing on slaves)
Date: 2014-10-22 13:20:51
Message-ID: CAB7nPqTDiAG-AoOiZU3bFkF93pVyviYN=Ki1QWA3TfHWA9oLTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Oct 17, 2014 at 2:23 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> I found one problem in the 0002 patch. The patch changes the recovery so
> that
> it creates .done files for every WAL files which exist in pg_xlog
> directory at
> the end of recovery. But even WAL files which will have to be archived
> later
> can exist in pg_xlog at that moment. For example, the latest, recycled and
> fully-written-but-not-archived-yet (i.e., maybe having .ready files) WAL
> files.
> The patch wrongly prevents them from being archived at all.
>
Re-looking at patch 2, yes you are right. Even if it was mentioned that we
should do that for a node that had promotion triggered it was not done this
way as a check on CheckForStandbyTrigger() is actually missing. Attached is
an updated patch.

> ISTM that the 0001 patch has the similar problem. Please imagine the
> following
> scenario.
> In this case, the patch seems to make the restartpoint recycle even WAL
> files
> which have .ready files and will have to be archived later. Thought?
>
Right, that's really backward. This was the approach taken before c9cc7e0,
and this commit actually prevents removal of unarchived WAL files during
recovery.
--
Michael

Attachment Content-Type Size
20141022_enforce_done_at_promotion.patch text/x-diff 4.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dag-Erling Smørgrav 2014-10-22 13:21:52 Re: [PATCH] add ssl_protocols configuration option
Previous Message Dag-Erling Smørgrav 2014-10-22 13:16:56 Re: [PATCH] add ssl_protocols configuration option