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: michael(at)paquier(dot)xyz, tgl(at)sss(dot)pgh(dot)pa(dot)us, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: [BUG] non archived WAL removed during production crash recovery
Date: 2020-04-27 10:42:47
Message-ID: 20200427124247.32baae44@firost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Mon, 27 Apr 2020 18:21:07 +0900 (JST)
Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:

> At Mon, 27 Apr 2020 16:49:45 +0900, Michael Paquier <michael(at)paquier(dot)xyz>
> wrote in
[...]
> > With your patch the problem does not show up anymore even with the
> > delay added, so I would like to apply what you have sent and add back
> > those tests. For now, I would just patch HEAD though as that's not
> > worth the risk of destabilizing stable branches in the buildfarm.

Good for me. Thanks!

> Agreed to the diagnosis and the fix. The fix reliably cause a restart
> point then the restart point manipulats the status files the right way
> before the CHECKPOINT command resturns, in the both cases.
>
> If I would add something to the fix, the following line may need a
> comment.
>
> +# Wait for the checkpoint record is replayed so that the following
> +# CHECKPOINT causes a restart point reliably.
> |+$standby1->poll_query_until('postgres',
> |+ qq{ SELECT pg_wal_lsn_diff(pg_last_wal_replay_lsn(),
> '$primary_lsn') >= 0 }

Agree.

Regards,

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2020-04-27 12:37:22 Re: BUG #16393: PANIC: cannot abort transaction, it was already committed
Previous Message PG Bug reporting form 2020-04-27 10:11:52 BUG #16394: Conflicting package postgis versions 2.5 and 3.0

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2020-04-27 10:43:03 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions
Previous Message Dilip Kumar 2020-04-27 10:34:55 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions