Re: logical decoding and replication of sequences
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>, Petr Jelinek <petr.jelinek@enterprisedb.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-04T11:45:36Z
Lists: pgsql-hackers
On Mon, Apr 4, 2022 at 11:42 AM Masahiko Sawada <sawada.mshk@gmail.com> wrote: > > On Sat, Apr 2, 2022 at 8:52 PM Tomas Vondra > <tomas.vondra@enterprisedb.com> wrote: > > It's not related to this issue but I think that non-transactional > sequence changes could be resent in case of the subscriber crashes > because it doesn’t update replication origin LSN, is that right? If > so, while resending the sequence changes, the sequence value on the > subscriber can temporarily go backward. > Yes, this can happen for the non-transactional sequence changes though this is a different problem than what is happening on the decoding side. > > >> Also, there's the bug with decoding changes in transactions that create > > >> the sequence and add it to a publication. I think the agreement was that > > >> this behavior was incorrect, we should not decode changes until the > > >> subscription is refreshed. Doesn't that mean can't be any CREATE case, > > >> just ALTER? > > >> > > > > > > Yeah, but how will we distinguish them. Aren't they using the same > > > kind of WAL record? > > > > > > > Same WAL record, but the "created" flag which should distinguish these > > two cases, IIRC. > > Since the "created" flag indicates that we created a new relfilenode > so it's true when both CREATE and ALTER. > Yes, this is my understanding as well. So, we need something else. -- With Regards, Amit Kapila.
Commits
-
Fix cache invalidation bug in recovery_prefetch.
- d0d934490020 15.0 landed
- 932b01630095 16.0 landed
-
Revert "Logical decoding of sequences"
- 2c7ea57e56ca 15.0 landed
-
Minor improvements in sequence decoding code and docs
- 05843b1aa49d 15.0 landed
-
Handle sequences in preprocess_pubobj_list
- 002c9dd97a0c 15.0 landed
-
Update tab-completion for CREATE PUBLICATION with sequences
- 2d2232933b02 15.0 landed
-
Add decoding of sequences to built-in replication
- 75b1521dae1f 15.0 landed
-
Stabilize test_decoding touching with sequences
- a180c2b34de0 15.0 landed
-
Call ReorderBufferProcessXid from sequence_decode
- d5ed9da41d96 15.0 landed
-
Add decoding of sequences to test_decoding
- 80901b32913f 15.0 landed
-
Replace Test::More plans with done_testing
- 549ec201d613 15.0 cited
-
Logical decoding of sequences
- 0da92dc530c9 15.0 landed
-
Respect permissions within logical replication.
- a2ab9c06ea15 15.0 cited