Subscribing to a Replication Set

Once you've defined a replication set, the origin node starts pushing a history of every modification to the _cluster-name.sl_log_1 table and sends SYNC events to all subscriber nodes. Subscribing to a replication set is a two-step process. First, you copy the table (and sequence) definitions into the subscriber node. Second, you execute a subscribe set command to tell the slon daemons to start pulling data out of the sl_log_1 history file into the subscriber database.

Copying Table and Sequence Definitions

The easiest way to copy the table and sequence definitions to the subscriber node is to talk pg_dump and psql into doing it for you. First, make sure that the target schema exists on the subscriber node. For ...

Get PostgreSQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.