From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: masao.fujii@oss.nttdata.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: [BUG] non archived WAL removed during production crash recovery
Date: Fri, 24 Apr 2020 16:05:10 +0900
Message-ID: <20200424070510.GM33034@paquier.xyz> (raw)
In-Reply-To: <20200424014856.f3jvvcxxmt5p7k5z@alap3.anarazel.de>
References: <20200422175824.637bda91@firost>
<20200422181717.491fb499@firost>
<20200422234618.GI33034@paquier.xyz>
<20200423.140546.1055476118690602079.horikyota.ntt@gmail.com>
<20200423185953.5f8e5b8f@firost>
<20200423235402.GJ33034@paquier.xyz>
<20200424014856.f3jvvcxxmt5p7k5z@alap3.anarazel.de>
On Thu, Apr 23, 2020 at 06:48:56PM -0700, Andres Freund wrote:
> But don't we pretty much know this already from the state of the system?
> During crash recovery there's nothing running RemoveOldXLogFiles() but
> the startup process. Right? And in DB_IN_ARCHIVE_RECOVERY it should only
> happen as part of restartpoints (i.e. the checkpointer).
>
> Did you add the new shared state to avoid deducing things from the
> "environment"? If so, it should really be mentioned in the commit
> message & code. Because:
Hmm. Sorry, I see your point. The key of the logic here is from
XLogArchiveCheckDone() which could be called from other processes than
the startup process. There is one code path at the end of a base
backup for backup history files where not using a shared state would
be a problem.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../20200424070510.GM33034@paquier.xyz/2-signature.asc)
download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: michael@paquier.xyz, andres@anarazel.de, jgdr@dalibo.com, horikyota.ntt@gmail.com, masao.fujii@oss.nttdata.com, pgsql-bugs@lists.postgresql.org
Subject: Re: [BUG] non archived WAL removed during production crash recovery
In-Reply-To: <20200424070510.GM33034@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox