Re: logical decoding and replication of sequences
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Tomas Vondra <tomas.vondra@enterprisedb.com>,
Petr Jelinek <petr.jelinek@enterprisedb.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-01-27T16:05:59Z
Lists: pgsql-hackers
Attachments
- 0001-fixup-Change-skip-sequences-to-false-by-default.patch (text/plain) patch 0001
- 0003-fixup-Add-support-for-decoding-sequences-to-built-in.patch (text/plain) patch 0003
On 27.01.22 00:32, Tomas Vondra wrote: > > On 1/26/22 14:01, Petr Jelinek wrote: >> I would not remove it altogether, there is plenty of consumers of this >> extension's output in the wild (even if I think it's >> unfortunate) that might not be interested in sequences, but changing >> it to off by default certainly makes sense. > > Indeed. Attached is an updated patch series, with 0003 switching it to > false by default (and fixing the fallout). For commit I'll merge that > into 0002, of course. (could be done in separate patches too IMO) test_decoding.c uses %zu several times for int64 values, which is not correct. This should use INT64_FORMAT or %lld with a cast to (long long int). I don't know, maybe it's worth commenting somewhere how the expected values in contrib/test_decoding/expected/sequence.out come about. Otherwise, it's quite a puzzle to determine where the 3830 comes from, for example. I think the skip-sequences options is better turned around into a positive name like include-sequences. There is a mix of "skip" and "include" options in test_decoding, but there are more "include" ones right now. In the 0003, a few files have been missed, apparently, so the tests don't fully pass. See attached patch. I haven't looked fully through the 0004 patch, but I notice that there was a confusing mix of FOR ALL SEQUENCE and FOR ALL SEQUENCES. I have corrected that in the other attached patch. Other than the mentioned cosmetic issues, I think 0001-0003 are ready to go.
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