Postgres Logical Replication: Replication slot, Subscriber and Publisher Creation Order Matters?

773 Views Asked by At

I got to a scenario where it says publication does not exist, although it does. I suspect what caused this is the order the scripts ran on publisher and subscriber servers.

Is it valid to create "Replication slot", subscriber and publisher at any order?

1

There are 1 best solutions below

7
On BEST ANSWER

Creating the subscription will create the replication slot by default, but you can opt to create the slot beforehand.

You can create a subscription before you create the publication, but then you'd have to refresh the subscription with ALTER SUBSCRIPTION ... REFRESH PUBLICATION.