Re: [BUG] non archived WAL removed during production crash recovery

From: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, michael(at)paquier(dot)xyz
Subject: Re: [BUG] non archived WAL removed during production crash recovery
Date: 2020-04-02 13:02:34
Message-ID: 20200402150234.278ae845@firost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Thu, 02 Apr 2020 13:07:34 +0900 (JST)
Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:

> Sorry, it was quite ambiguous.
>
> At Thu, 02 Apr 2020 13:04:43 +0900 (JST), Kyotaro Horiguchi
> <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> > At Wed, 1 Apr 2020 18:17:35 +0200, Jehan-Guillaume de Rorthais
> > <jgdr(at)dalibo(dot)com> wrote in
> > > Please, find in attachment a patch implementing this.
> >
> > The patch partially reintroduces the issue the patch have
> > fixed. Specifically a standby running a crash recovery wrongly marks a
> > WAL file as ".ready" if it is extant in pg_wal without accompanied by
> > .ready file.
>
> The patch partially reintroduces the issue the commit 78ea8b5daa have
> fixed. Specifically a standby running a crash recovery wrongly marks a
> WAL file as ".ready" if it is extant in pg_wal without accompanied by
> .ready file.

As far as I understand StartupXLOG(), NOT_IN_RECOVERY and IN_CRASH_RECOVERY are
only set for production clusters, not standby ones. So the following test
should never catch standby cluster as :

(XLogArchivingActive() && inRecoveryState != IN_ARCHIVE_RECOVERY)

Forgive me if I'm wrong, but do I miss something?

Regards,

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Jehan-Guillaume de Rorthais 2020-04-02 13:49:15 Re: [BUG] non archived WAL removed during production crash recovery
Previous Message Mario Emmenlauer 2020-04-02 11:59:12 Re: BUG #16336: Undefined symbols since upgrade of VS to 2019.5.2, and other issues

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-04-02 13:10:51 Re: WAL usage calculation patch
Previous Message Julien Rouhaud 2020-04-02 13:00:45 Re: Collation versioning