Re: pg_wal/RECOVERYHISTORY file remains after archive recovery

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_wal/RECOVERYHISTORY file remains after archive recovery
Date: 2019-09-27 08:58:21
Message-ID: CAHGQGwEZVrONEr53pGyBCD9ftogDp3F55P2H7U_zG1rm-NeutA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 27, 2019 at 5:09 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> On Fri, Sep 27, 2019 at 01:51:25PM +0900, Masahiko Sawada wrote:
> > On Thu, Sep 26, 2019 at 6:23 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> >> What about moving the logic that removes RECO VERYXLOG and
> >> RECOVERYHISTORY from exitArchiveRecovery() and performing it
> >> just before/after RemoveNonParentXlogFiles()? Which looks simple.
> >
> > Agreed. Attached the updated patch.
>
> Mea culpa here, I have just noticed the thread. Fujii-san, would you
> prefer if I take care of it? And also, what's the issue with not
> doing the removal of both files just after writeTimeLineHistory()?
> That's actually what happened before cbc55da5.

So you think that it's better to remove them just after writeTimeLineHistory()?
Per the following Sawada-san's comment, I was thinking that idea is basically
not good. And, RemoveNonParentXlogFiles() also removes garbage files from
pg_wal. It's simpler if similar codes exist near. Thought?

Regards,

--
Fujii Masao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2019-09-27 09:03:32 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Fujii Masao 2019-09-27 08:41:09 Re: recovery starting when backup_label exists, but not recovery.signal