Logical replication slots v7

When using the log-based method on a publication database, the underlying logical decoding framework exposes the data changes (the changeset stream) by means of a logical replication slot.

A logical replication slot represents a changeset stream and applies to a single database. Replication Server assigns a unique identifier, called the slot name, to each logical replication slot it creates in the form xdb_<dboid>_<pubid> where <dboid> is the publication database object identifier (OID) and <pubid> is the publication ID assigned by Replication Server. All slot names are unique in a Postgres database cluster.

Thus, for each single-master replication system using the log-based method, a replication slot is required for the publication database of each such system.

For a multi-master replication system using the log-based method, each primary node requires a replication slot.

The maximum number of replication slots permitted for a database server is controlled by the max_replication_slots configuration parameter in the postgresql.conf file. Therefore, you must set this configuration parameter to a value large enough to account for:

  • All publication databases defined with the log-based method of single-master replication systems running on the database server.
  • All primary nodes of a multi-master replication system defined with the log-based method running on the database server.

Additional replication slots are required to support the use of replication origin (see Replication origin).

For more information on configuration parameters for single-master replication systems, see Enabling synchronization replication with the log-based method.

For multi-master replication systems, see Enabling synchronization replication with the log-based method.