2ndQuadrant / pglogical

Logical Replication extension for PostgreSQL 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
987 stars 153 forks source link

add additional sync finish condition check to fix infinite catchup status #447

Open woonhak opened 9 months ago

woonhak commented 9 months ago

If sync process synced very closely to the their remote, there is a possibility that no commit since the starting LSN point. If that is the case, apply worker is infinitely waiting for sync worker finished, but sync worker also is waiting for new commit to finish catching up state even if sync worker synced all of the log record from remote. This randomly happened while running add_table test when alter_subscription_resynchronize_table() called and wait for complete sync. To address that issue, we can evaluate sync finish condition while pulling log records.