From: Noah Misch <noah@leadboat.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: 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: Sun, 24 Apr 2022 22:22:55 -0700
Message-ID: <20220425052255.GA1360718@rfd.leadboat.com> (raw)
In-Reply-To: <YmYtfjtKnV/v3lXn@paquier.xyz>
References: <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>
<20220424030347.GA1285591@rfd.leadboat.com>
<YmYtfjtKnV/v3lXn@paquier.xyz>
On Mon, Apr 25, 2022 at 02:11:26PM +0900, Michael Paquier wrote:
> On Sat, Apr 23, 2022 at 08:03:47PM -0700, Noah Misch wrote:
> > 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.
>
> I am not sure that we should add more reloptions that bypass AEL
> requirements FWIW, because the standby would still be opened to cache
> errors if you don't log something, would it not?
Correct. Even so, a mandatory AEL when replaying CIC would be worse.
> > 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.
>
> Perhaps. Still, that would be mostly what WaitForOlderSnapshots()
> already does, except that we'd roughly just use the limitXmin from the
> snapshot of the transaction currently running?
I don't know.
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: <20220425052255.GA1360718@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