Re: logical decoding and replication of sequences
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Petr Jelinek <petr.jelinek@enterprisedb.com>
Date: 2021-12-22T15:40:17Z
Lists: pgsql-hackers
Attachments
- 0001-WAL-log-individual-sequence-fetches-20211222.patch (text/x-patch) patch 0001
- 0002-Logical-decoding-of-sequences-20211222.patch (text/x-patch) patch 0002
- 0003-Add-support-for-decoding-sequences-to-test_-20211222.patch (text/x-patch) patch 0003
- 0004-tweak-test_decoding-tests-20211222.patch (text/x-patch) patch 0004
- 0005-Add-support-for-decoding-sequences-to-built-20211222.patch (text/x-patch) patch 0005
- 0006-update-TAP-tests-20211222.patch (text/x-patch) patch 0006
Hi, Here's an updated version of the patch series. The primary change is tweaking the WAL-logging of sequences modified per [1]. This changes test output in test_decoding and built-in replication patches, and to make it clearer I left the changes in separate patches. Assuming the WAL logging changes are acceptable, that resolves the data loss issue. I'm wondering what to do about changes with is_called=false, i.e. changes generated by ALTER SEQUENCE etc. The current patch does decode them and passes them to the output plugin, but I'm starting to think that may not be the right behavior - if we haven't generated any data from the sequence, there's no point in replicating that, I think. regards [1] https://www.postgresql.org/message-id/712cad46-a9c8-1389-aef8-faf0203c9be9%40enterprisedb.com -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
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