From: Noah Misch <noah@leadboat.com>
To: Michael Paquier <michael@paquier.xyz>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: Andres Freund <andres@anarazel.de>
Cc: Ben Chobot <bench@silentmedia.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica
Date: Sat, 23 Apr 2022 20:03:47 -0700
Message-ID: <20220424030347.GA1285591@rfd.leadboat.com> (raw)
In-Reply-To: <7E6A0189-0BDC-4760-AA61-32780E8D33D8@yandex-team.ru>
References: <C50E352E-FE90-46EC-94C2-3E96D9DDB141@yandex-team.ru>
<bafcc4ab-8732-0503-ef17-0ee0420cf527@silentmedia.com>
<04D2D137-102E-400D-B66B-C073C27A1327@yandex-team.ru>
<20220211001240.47idtavhfyzi4aa3@alap3.anarazel.de>
<AE561C32-E452-43D5-86EB-1CEB57405F95@yandex-team.ru>
<29311A7B-240A-451A-9DC8-4909A0FEAE12@yandex-team.ru>
<Yl+y7kvCDR6x4V+E@paquier.xyz>
<5ABDE9D8-D09C-4281-9F84-BF73A865A726@yandex-team.ru>
<YmDVWJt4WjRKFvAV@paquier.xyz>
<7E6A0189-0BDC-4760-AA61-32780E8D33D8@yandex-team.ru>
Drive-by comment:
On Sat, Apr 23, 2022 at 11:02:04AM +0500, Andrey Borodin wrote:
> I've removed amcheck from the test and replaced it with a simple IndexOnlyScan. I'm not proposing to commit this test anyway, so I left it in amcheck.
> The test reliably fails in 30s or earlier.
>
> 2022-04-23 10:51:06.872 +05 [36192] 004_cic_standby.pl LOG: statement: select i from tbl where i = 236116;
> 2022-04-23 10:51:06.890 +05 [36192] 004_cic_standby.pl ERROR: could not open relation with OID 16671
> 2022-04-23 10:51:06.890 +05 [36192] 004_cic_standby.pl STATEMENT: select i from tbl where i = 236116;
>
> Adding AEL's seem to solve the problem.
If this thread proceeds with the current LogAccessExclusiveLock() design, I
think it must include a way to disable the new behavior. That requirement
would apply to any design that delays standby WAL apply in a way that
hot_standby_feedback can't mitigate. We have the vacuum_truncate reloption
because AEL is disruptive to standby freshness. Adding a new kind of
unavoidable AEL would be similarly-painful.
It would nicer to fix this such that, with hot_standby_feedback, the fix
delays CIC on the primary instead of delaying apply on the standby. If that's
too hard, AEL plus option-to-disable sounds fine.
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: noah@leadboat.com, michael@paquier.xyz, x4mmm@yandex-team.ru, andres@anarazel.de, bench@silentmedia.com, pg@bowt.ie, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17401: REINDEX TABLE CONCURRENTLY creates a race condition on a streaming replica
In-Reply-To: <20220424030347.GA1285591@rfd.leadboat.com>
* 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