There's more…
If the initial synchronization has been running for a protracted duration, the last check we supplied may report very different values. After all, pg-old is still receiving new rows for all tables, and the snapshot for the initial synchronization to pg-new may have been established hours, or even days ago.
Luckily, we can actually exploit the same trick pglogical used when creating the transaction snapshot. Since it needs the snapshot to ensure every COPY statement is consistent, we can actually use the transaction ID as well.
So long as we connect as a superuser, it's possible to specify the transaction snapshot ID and see the same thing as pglogical while it sends data to pg-new.
If we want to do this, we merely need to obtain ...
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