Re: Logical Replication of sequences
shveta malik <shveta.malik@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
6) I tried to test the patch. When sequences are more than the batch-size, but not enough to make a complete batch of max size, I get this error: LOG: logical replication sequence synchronization for subscription "sub1" - total unsynchronized: 118 LOG: logical replication sequence synchronization for subscription "sub1" - batch #1 = 100 attempted, 100 succeeded, 0 skipped, 0 mismatched, 0 insufficient pemission, 0 missing, WARNING: leaked hash_seq_search scan for hash table 0x5fcc78ff8f90 ERROR: no hash_seq_search scan for hash table "Logical replication sequence sync worker sequences" LOG: background worker "logical replication sequencesync worker" (PID 137165) exited with exit code 1 This is on creating 118 sequences. It can be easily reproduced by reducing bath-size (MAX_SEQUENCES_SYNC_PER_BATCH) to say 5 and having 6 sequences in total. It seems we break out of the loop of creating a batch only if batch_size >= MAX_SEQUENCES_SYNC_PER_BATCH. When we try to access hash_seq_search() more than the entries present, it gives the above error. thanks Shveta