Managing Subscriptions
Set up and manage subscriptions on a standby server to receive and apply changes from a publication.
What is a Logical Subscription?
In PostgreSQL's logical replication, a subscription is the receiving end. It's configured on a subscriber server to connect to a publisher server and pull data changes from a specific publication.
Think of it as subscribing to a newspaper. The publisher creates the newspaper (publication), and you (the subscriber) sign up to receive it.
The Subscriber Server Role
The server where you create a subscription becomes the subscriber. This server will connect to the publisher, receive the changes (inserts, updates, deletes, truncates), and apply them to its local tables.
It's crucial that the tables on the subscriber have the same structure as the published tables on the master for replication to work correctly.