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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
Cc: 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-08 07:44:59
Message-ID: CAB7nPqTO9fCEuZ_UtJgt2LQmPkZBKTCEVitMtVSKtr7dYo+o6w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 19, 2014 at 1:07 AM, Jehan-Guillaume de Rorthais <
jgdr(at)dalibo(dot)com> wrote:

> We kept the WAL files and log files for further analysis. How can we help
> regarding this issue?
>

Commit c2f79ba has added as assumption that the WAL receiver should always
enforce the create of .done files when WAL files are done being streamed
(XLogWalRcvWrite and WalReceiverMain) or archived
(KeepFileRestoredFromArchive). Then using this assumption 1bd42cd has
changed a bit RemoveOldXlogFiles, removing a check looking if the node is
in recovery. Now, based on the information given here yes it happens that
there are still cases where .done file creation is not correctly done,
leading to those extra files. Even by looking at the code, I am not
directly seeing any code paths where an extra call to XLogArchiveForceDone
would be needed on the WAL receiver side but... Something like the patch
attached (which is clearly a band-aid) may help though as it would make
files to be removed even if they are not marked as .done for a node in
recovery. And this is consistent with the pre-1bd42cd.

Comments welcome.
--
Michael

Attachment Content-Type Size
20141008_xlog_file_enforce_deletion.patch text/x-diff 558 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2014-10-08 08:10:26 Re: Promise index tuples for UPSERT
Previous Message Anssi Kääriäinen 2014-10-08 07:41:14 Re: Promise index tuples for UPSERT