How it works…
This is, thankfully, a short and easy-to-understand recipe. Unlike when we were registering tables and had to account for primary keys, sequences aren't tables at all, so when we register them with pglogical, we don't need to do anything special.
As a result, we can simply invoke replication_set_add_all_sequences to process all sequences for the schemas we want to copy, rather than using replication_set_add_sequence for each individual sequence. It's also a good idea to verify we added the sequences we expected, since we don't necessarily know how pglogical might interpret all sequences in the listed schemas.
As an example on our test system where we have a sensor_log table with a sequence, we saw these results:
It's only one ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access