Re: logical decoding and replication of sequences

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Noah Misch <noah@leadboat.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Amit Kapila <amit.kapila16@gmail.com>, Petr Jelinek <petr.jelinek@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-08-07T21:09:53Z
Lists: pgsql-hackers
On Mon, Aug 8, 2022 at 7:12 AM Noah Misch <noah@leadboat.com> wrote:
> On Sun, Aug 07, 2022 at 03:18:52PM +0200, Tomas Vondra wrote:
> > I'd bet it's about WAL prefetching, not the revert, and the bisect was a
> > bit incorrect, because the commits are close and the failures happen to
> > be rare. (Presumably you first did the bisect and then wrote the patch
> > that reproduces this, right?)
>
> No.  I wrote the patch, then used the patch to drive the bisect.  With ten
> iterations, commit 2c7ea57 passes 0/10, while 2c7ea57^ passes 10/10.  I've now
> tried recovery_prefetch=off.  With that, the test passes 10/10 at 2c7ea57.
> Given your observation of a failure at 5dc0418fab2, I agree with your
> conclusion.  Whatever the role of 2c7ea57 in exposing the failure on my
> machine, a root cause in WAL prefetching looks more likely.
>
> > Adding Thomas Munro to the thread, he's the WAL prefetching expert ;-)

Thanks for the repro patch and bisection work.  Looking...



Commits

  1. Fix cache invalidation bug in recovery_prefetch.

  2. Revert "Logical decoding of sequences"

  3. Minor improvements in sequence decoding code and docs

  4. Handle sequences in preprocess_pubobj_list

  5. Update tab-completion for CREATE PUBLICATION with sequences

  6. Add decoding of sequences to built-in replication

  7. Stabilize test_decoding touching with sequences

  8. Call ReorderBufferProcessXid from sequence_decode

  9. Add decoding of sequences to test_decoding

  10. Replace Test::More plans with done_testing

  11. Logical decoding of sequences

  12. Respect permissions within logical replication.