From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>
Subject: Re: failures in t/031_recovery_conflict.pl on CI
Date: Tue, 12 Apr 2022 17:26:26 -0700
Message-ID: <20220413002626.udl7lll7f3o7nre7@alap3.anarazel.de> (raw)
In-Reply-To: <907760.1649790322@sss.pgh.pa.us>
References: <20220409045515.35ypjzddp25v72ou@alap3.anarazel.de>
<20220409050501.frejv2i46m54keem@alap3.anarazel.de>
<20220409220054.fqn5arvbeesmxdg5@alap3.anarazel.de>
<20220409231002.mddrr7mtca7p55v5@alap3.anarazel.de>
<20220409233107.v7okovwr46xsizfk@alap3.anarazel.de>
<5111.1649547266@sss.pgh.pa.us>
<20220412184913.3wrt4olkdiqvicsj@alap3.anarazel.de>
<907760.1649790322@sss.pgh.pa.us>
Hi,
On 2022-04-12 15:05:22 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2022-04-09 19:34:26 -0400, Tom Lane wrote:
> >> +1. This is probably more feasible given the latch infrastructure
> >> than it was when that code was first written.
>
> > What do you think about just reordering the disable_all_timeouts() to be
> > before the got_standby_deadlock_timeout check in the back branches? I think
> > that should close at least the most obvious hole. And fix it properly in
> > HEAD?
>
> I don't have much faith in that, and I don't see why we can't fix it
> properly.
It's not too hard, agreed.
It's somewhat hard to test that it works though. The new recovery conflict
tests test all recovery conflicts except for deadlock ones, because they're
not easy to trigger... But I think I nearly got it working reliably.
It's probably worth backpatching the tests, after stripping them of the stats
checks?
Three questions:
- For HEAD we have to replace the disable_all_timeouts() calls, it breaks the
replay progress reporting. Is there a reason to keep them in the
backbranches? Hard to see how an extension or something could rely on it,
but ...?
- I named the variable set by the signal handler got_standby_delay_timeout,
because just got_standby_timeout looked weird besides the _deadlock_. Which
makes me think that we should rename STANDBY_TIMEOUT to
STANDBY_DELAY_TIMEOUT too?
- There's the following comment in ResolveRecoveryConflictWithBufferPin():
"We assume that only UnpinBuffer() and the timeout requests established
above can wake us up here."
That bogus afaict? There's plenty other things that can cause MyProc->latch
to be set. Is it worth doing something about this at the same time? Right
now we seem to call ResolveRecoveryConflictWithBufferPin() in rapid
succession initially.
Greetings,
Andres Freund
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: andres@anarazel.de, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, thomas.munro@gmail.com
Subject: Re: failures in t/031_recovery_conflict.pl on CI
In-Reply-To: <20220413002626.udl7lll7f3o7nre7@alap3.anarazel.de>
* 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