53.20. pg_replication_slots
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 Replication Slots and Logical Decoding.
Column Type Description |
|---|
slot_name A unique, cluster-wide identifier for the replication slot |
plugin The base name of the shared object containing the output plugin this logical slot is using, or null for physical slots. |
slot_type The slot type: |
datoid The OID of the database this slot is associated with, or null. Only logical slots have an associated database. |
database The name of the database this slot is associated with, or null. Only logical slots have an associated database. |
temporary True 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. |
active True if this slot is currently being streamed |
active_pid The process ID of the session streaming data for this slot. |
xmin The oldest transaction that this slot needs the database to retain. |
catalog_xmin The oldest transaction affecting the system catalogs that this slot needs the database to retain. |
restart_lsn The address (
|
confirmed_flush_lsn The address ( |
wal_status Availability of WAL files claimed by this slot. Possible values are:
|
safe_wal_size The number of bytes that can be written to WAL such that this slot is not in danger of getting in state "lost". It is NULL for lost slots, as well as if |
two_phase True if the slot is enabled for decoding prepared transactions. Always false for physical slots. |
two_phase_at The address ( |
inactive_since The time when the slot became inactive. |
conflicting True if this logical slot conflicted with recovery (and so is now invalidated). When this column is true, check invalidation_reason column for the conflict reason. Always |
invalidation_reason The reason for the slot's invalidation. It is set for both logical and physical slots.
|
failover True if this is a logical slot enabled to be synced to the standbys so that logical replication can be resumed from the new primary after failover. Always false for physical slots. |
synced True if this is a logical slot that was synced from a primary server. On a hot standby, the slots with the synced column marked as true can neither be used for logical decoding nor dropped manually. The value of this column has no meaning on the primary server; the column value on the primary is default false for all slots but may (if leftover from a promoted standby) also be true. |
: pg_replication_slots Columns