Re: [PATCH] Fix TOCTOU races in recovery/t/020_archive_status.pl archive checks

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bryan Green <dbryan(dot)green(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Alexander Lakhin <exclusion(at)gmail(dot)com>
Subject: Re: [PATCH] Fix TOCTOU races in recovery/t/020_archive_status.pl archive checks
Date: 2026-08-10 23:46:20
Message-ID: anpizO0VLptyOS_e@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 10, 2026 at 10:32:05AM -0500, Bryan Green wrote:
> I have been playing in this area with a fork, and looking at it more
> closely, this doesn't fix a stock failure. To correct my original note--
> a plain CHECKPOINT doesn't force a segment switch, so that wasn't a real
> trigger either. The change just trades a little coverage (exact-equality
> would catch a spurious extra segment; >= wouldn't) for tolerance of
> concurrent archiving that only happens in the fork. I don't have an
> upstream case for it and I'm happy to drop it. If you think the added
> tolerance is worth keeping as hygiene, I'll leave that to you.

This one depends on the community buildfarm for me, and it looks like
I have lost access to the buildfarm database.. Adding Alexander
Lakhin in CC, perhaps he has bumped into a failure on this one.

I miss the highlights in the CI, now I have not seen this test show up
recently there.

@Alexander: Have you noticed some turbulence in the force regarding
the recovery test 020_archive_status.pl?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2026-08-11 00:04:09 Re: Why is the LSN reported for pg_logical_emit_message() different from other decoded operations?
Previous Message Peter Smith 2026-08-10 23:20:39 Re: Missing list_free in publicationcmds.c:OpenTableList