There's more…
It probably seems dire when we say that the initial subscription requires success, or we must start from the beginning. This really is a natural consequence of how transaction snapshot exports work; if we lose the connection holding that snapshot, we don't have a consistent picture of the data.
In that case, and especially for larger databases, it may make more sense to avoid adding any tables or sequences to the subscription set we create on pg-old. It is quite possible to subscribe to an empty replication set, and this should succeed relatively quickly and establish a communication channel between both servers that is reliant only upon the replication slot.
Once we've done this, we can actually add tables to the replication ...
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