Logical Replication Slots v6.2
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. The xDB 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 the xDB Replication Server. All slot names are unique within 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 this configuration parameter must be set to a large enough value to account for all publication databases defined with the log-based method of single-master replication systems running on the database server as well as 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 usage of replication origin (see Replication Origin). See Enabling Synchronization Replication with the Log-Based Method for additional information on configuration parameters for single-master replication systems. See Enabling Synchronization Replication with the Log-Based Method for multi-master replication systems.