Re: BUG #17389: pg_repack creates race conditions on streaming replicas

From: Ben Chobot <bench(at)silentmedia(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17389: pg_repack creates race conditions on streaming replicas
Date: 2022-02-01 21:28:30
Message-ID: 80045c73-1e89-65af-34c6-c3b1cc666e66@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund wrote on 1/31/22 1:54 PM:
> pg_repack modifies catalogs in an unsupported way, so it's not surprising
> you'd see some odd effects. Postgres locking and visibility logic doesn't know
> about what pg_repack is doing, so it can't enforce correct semantics. I'd
> assume that the repack developers haven't gotten the locking logic quite right
> someplace.

So that all make sense to me, except that - surprise! - it turns out
we're seeing the same behavior if we leave pg_repack out of it and just
do a REINDEX TABLE CONCURRENTLY in a loop on the primary node. Again,
reliably within 30 minutes, the select on the secondary will fail with
an OID error, but not on the primary.

Sorry, I should have led with this more vanilla test case, but I didn't
think to try it till Nick Cleaton reminded me that PG12 brought us
REINDEX TABLE CONCURRENTLY.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Amit Langote 2022-02-02 03:59:01 Re: BUG #17355: Server crashes on ExecReScanForeignScan in postgres_fdw when accessing foreign partition
Previous Message smk_va@yahoo.com 2022-02-01 20:35:36 Re: BUG #17390: Function, to_date() -- unexpected values and a request