Re: Logical Replication of sequences
vignesh C <vignesh21@gmail.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Doc: Add documentation for sequence synchronization.
- 55cefadde874 19 (unreleased) landed
-
Remove unused assignment in CREATE PUBLICATION grammar.
- bfb7419b0bbe 19 (unreleased) landed
-
Add seq_sync_error_count to subscription statistics.
- f6a4c498dcf6 19 (unreleased) landed
-
Fix few issues in commit 5509055d69.
- 5a4eba558aa7 19 (unreleased) landed
-
Add sequence synchronization for logical replication.
- 5509055d6956 19 (unreleased) landed
-
Add worker type argument to logical replication worker functions.
- 3e8e05596a02 19 (unreleased) landed
-
Introduce "REFRESH SEQUENCES" for subscriptions.
- f0b3573c3aac 19 (unreleased) landed
-
Refactor logical worker synchronization code into a separate file.
- 41c674d2e31e 19 (unreleased) landed
-
Standardize use of REFRESH PUBLICATION in code and messages.
- 2436b8c047ff 19 (unreleased) landed
-
Add "ALL SEQUENCES" support to publications.
- 96b378497346 19 (unreleased) landed
-
Expose sequence page LSN via pg_get_sequence_data.
- b93172ca59f4 19 (unreleased) landed
-
Resume conflict-relevant data retention automatically.
- 0d48d393d465 19 (unreleased) cited
-
Post-commit review fixes for 228c370868.
- 1f7e9ba3ac4e 19 (unreleased) cited
-
Generate GUC tables from .dat file
- 63599896545c 19 (unreleased) cited
Attachments
- v20240705-0003-Enhance-sequence-synchronization-during-su.patch (text/x-patch) patch v20240705-0003
- v20240705-0001-Introduce-pg_sequence_state-and-SetSequenc.patch (text/x-patch) patch v20240705-0001
- v20240705-0002-Introduce-ALL-SEQUENCES-support-for-Postgr.patch (text/x-patch) patch v20240705-0002
On Thu, 4 Jul 2024 at 12:44, Peter Smith <smithpb2250@gmail.com> wrote: > > Here are my review comments for the patch v20240703-0002 > > ====== > doc/src/sgml/ref/create_publication.sgml > > > Question: Was there a reason you chose wording "synchronizes changes" > instead of having same "replicates changes" wording of FOR ALL TABLES? Since at this point we are only supporting sync of sequences, there are no incremental changes being replicated to subscribers. I thought synchronization is better suited here. > ====== > src/backend/catalog/system_views.sql > > 1. > Should there be some new test for the view? Otherwise, AFAICT this > patch has no tests that will exercise the new function > pg_get_publication_sequences. pg_publication_sequences view uses pg_get_publication_sequences which will be tested with 3rd patch while creating subscription/refreshing publication sequences. I felt it is ok not to have a test here. > 5. > - bool for_all_tables; /* Special publication for all tables in db */ > + List *for_all_objects; /* Special publication for all objects in > + * db */ > > Is this OK? Saying "for all objects" seemed misleading. This change is not required, reverting it. > 6. > I asked this before in a previous review [1-#17] -- I didn't > understand the point of the sequence 'testpub_seq0' since nobody seems > to be doing anything with it. Should it just be removed? Or is there a > missing test case to use it? Since we are having all sequences published I wanted to have a sequence in another schema also. Adding describe for it too. > ~~~ > > 7. > Other things to consider: > > (I didn't include these in my attached diff) > > * could use a single CREATE SEQUENCE stmt instead of multiple CREATE SEQUENCE does not support specifying multiple sequences in one statement, skipping this. The rest of the comments are fixed, the attached v20240705 version patch has the changes for the same. Regards, Vignesh