From: Nathan Bossart <nathandbossart@gmail.com>
To: Melanie Plageman <melanieplageman@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: race condition when writing pg_control
Date: Thu, 16 May 2024 13:35:58 -0500
Message-ID: <20240516183558.GA1620903@nathanxps13> (raw)
In-Reply-To: <CAAKRu_YNGwEYrorQYza_W8tU+=toXRHG8HpyHC-KDbZqA_ZVSA@mail.gmail.com>
References: <20200523053935.GB266978@paquier.xyz>
<D162D812-D724-4B79-8D6C-CB1EFC9A796E@amazon.com>
<20200527071053.GD103662@paquier.xyz>
<fc796148-7d63-47bb-e91d-e09b62a502e9@oss.nttdata.com>
<A9F111A3-560A-4C21-A35B-9D3182704187@amazon.com>
<20200602052427.GC3594@paquier.xyz>
<CA+hUKGJJJOP1jfw4yRqozXghiqtXRH0gisHyNwa+nzCL_xyjcg@mail.gmail.com>
<20200603020259.GA89559@paquier.xyz>
<CA+hUKGKToqjdeRtr8ZHVbPToShun5ifjioj6x3nsjseOkhCMEQ@mail.gmail.com>
<CAAKRu_YNGwEYrorQYza_W8tU+=toXRHG8HpyHC-KDbZqA_ZVSA@mail.gmail.com>
On Thu, May 16, 2024 at 12:19:22PM -0400, Melanie Plageman wrote:
> Today, after committing a3e6c6f, I saw recovery/018_wal_optimize.pl
> fail and see this message in the replica log [2].
>
> 2024-05-16 15:12:22.821 GMT [5440][not initialized] FATAL: incorrect
> checksum in control file
>
> I'm pretty sure it's not related to my commit. So, I was looking for
> existing reports of this error message.
Yeah, I don't see how it could be related.
> It's a long shot, since 0001 and 0002 were already pushed, but this is
> the only recent report I could find of "FATAL: incorrect checksum in
> control file" in pgsql-hackers or bugs archives.
>
> I do see this thread from 2016 [3] which might be relevant because the
> reported bug was also on Windows.
I suspect it will be difficult to investigate this one too much further
unless we can track down a copy of the control file with the bad checksum.
Other than searching for any new code that isn't doing the appropriate
locking, maybe we could search the buildfarm for any other occurrences. I
also seem some threads concerning whether the way we are reading/writing
the control file is atomic.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
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-hackers@postgresql.org
Cc: nathandbossart@gmail.com, melanieplageman@gmail.com, thomas.munro@gmail.com, michael@paquier.xyz, masao.fujii@oss.nttdata.com, andres@anarazel.de
Subject: Re: race condition when writing pg_control
In-Reply-To: <20240516183558.GA1620903@nathanxps13>
* 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