The pg_replication_slots
view provides a list of all replication slots in the database cluster and the state of these replication slots.
Overview
The pg_replication_slots
view contains the following columns:
Column name | Type | Description |
slot_name | name | A unique, cluster-wide identifier for the replication slot. |
plugin | name | The base name of the shared object containing the output plugin that the logical slot is using. This value is empty for physical slots. |
slot_type | text | The type of the replication slot. Valid values: |
datoid | oid | The OID of the database with which this slot is associated. This value is empty for physical slots. Only a logical slot have an associated database. |
database | name | The name of the database with which this slot is associated. This value is empty for physical slots. Only a logical slot have an associated database. |
temporary | bool | The value is |
active | bool | The value is |
active_pid | int4 | The process ID of the session that uses this slot if the slot is being used. The value is |
xmin | xid | The oldest transaction that this slot needs the database to retain. |
catalog_xmin | xid | The oldest transaction affecting the system catalogs that this slot needs the database to retain. |
restart_lsn | pg_lsn | The address ( |
confirmed_flush_lsn | pg_lsn | The address ( |
wal_status | text | The availability of WAL files claimed by this slot. Valid values:
Note The unreserved and lost states are displayed only when the |
safe_wal_size | int8 | The number of bytes that can be written to WAL to ensure that this slot is not in the lost state. If the slot is in the lost state or the value of the |