跳至主要內容

KlustronDB大约 1 分钟

52.80. pg_replication_slots

The pg_replication_slots view provides a listing of all replication slots that currently exist on the database cluster, along with their current state.

For more on replication slots, see Section 26.2.6 and Chapter 49.

Table 52.81. pg_replication_slots Columns

NameTypeReferencesDescription
slot_namenameA unique, cluster-wide identifier for the replication slot
pluginnameThe base name of the shared object containing the output plugin this logical slot is using, or null for physical slots.
slot_typetextThe slot type - physical or logical
datoidoidpg_database.oidThe OID of the database this slot is associated with, or null. Only logical slots have an associated database.
databasetextpg_database.datnameThe name of the database this slot is associated with, or null. Only logical slots have an associated database.
temporarybooleanTrue if this is a temporary replication slot. Temporary slots are not saved to disk and are automatically dropped on error or when the session has finished.
activebooleanTrue if this slot is currently actively being used
active_pidintegerThe process ID of the session using this slot if the slot is currently actively being used. NULL if inactive.
xminxidThe oldest transaction that this slot needs the database to retain. VACUUM cannot remove tuples deleted by any later transaction.
catalog_xminxidThe oldest transaction affecting the system catalogs that this slot needs the database to retain. VACUUM cannot remove catalog tuples deleted by any later transaction.
restart_lsnpg_lsnThe address (LSN) of oldest WAL which still might be required by the consumer of this slot and thus won't be automatically removed during checkpoints. NULL if the LSN of this slot has never been reserved.
confirmed_flush_lsnpg_lsnThe address (LSN) up to which the logical slot's consumer has confirmed receiving data. Data older than this is not available anymore. NULL for physical slots.