2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 17, 16, 15, 14, 13, 12, 11, 10, 9.6, 9.5, 9.4 (Postgres), providing much faster replication than Slony, Bucardo or Londiste, as well as cross-version upgrades.
http://2ndquadrant.com/en/resources/pglogical/
Other
1.02k stars 154 forks source link

By what command will pglogical start full synchronization? #354

Open krast-napoli opened 2 years ago

krast-napoli commented 2 years ago

Hello. I have some questions about pglogical documentation. There is this text: "And finally on the subscriber node you can create the subscription which will start synchronization and replication process in the background:" Does it mean, that after creating subscription FULL synchronization will start ? If I'm right, could anybody explain me next part of documentation "pglogical.alter_subscription_synchronize(subscription_name name, truncate bool) All unsynchronized tables in all sets are synchronized in a single operation. Tables are copied and synchronized one by one. Command does not block, just initiates the action. Use pglogical.wait_for_subscription_sync_complete to wait for completion."

Why do we need this commands?

I create subscription which is in status replicating Then I run select pglogical.alter_subscription_synchronize('my_subscription'); But when I run

select count(id)
from
my_table;

I see different values on provider and subscriber, data which was updated on provider BEFORE creating subscription haven't been updated on subscriber