56.20. pg_replication_slots
Представление pg_replication_slots содержит список всех слотов репликации, существующих в данный момент в кластере баз данных, а также их текущее состояние.
За дополнительной информацией о слотах репликации обратитесь к Подразделу 26.2.6 и Главе 51.
Таблица 56.20. Столбцы pg_replication_slots
Тип столбца Описание |
|---|
Уникальный в рамках кластера идентификатор для слота репликации |
Базовое имя разделяемого объекта, содержащего модуль вывода, который используется этим логическим слотом, либо NULL для физических слотов. |
Тип слота: |
OID базы данных, с которой связан этот слот, либо NULL. С базой данных могут быть связаны только логические слоты. |
Имя базы данных, с которой связан этот слот, либо NULL. С базой данных могут быть связаны только логические слоты. |
True, если это временный слот репликации. Временные слоты не сохраняются на диск и автоматически удаляются при ошибке или завершении сеанса. |
True, если слот активно используется в данный момент |
ID процесса сеанса, занимающего этот слот, если данный слот активно используется в данный момент. |
Старейшая транзакция, которая должна сохраняться в базе данных для этого слота. |
Старейшая транзакция, затрагивающая системные каталоги, которая должна сохраняться в базе данных для этого слота. |
Адрес ( |
Адрес ( |
Состояние файлов WAL, нужных данному слоту. Возможные значения:
Последние два значения можно увидеть только при неотрицательном значении max_slot_wal_keep_size. |
Объём, который может быть записан в WAL, чтобы этот слот не оказался в состоянии «lost». Задаётся в байтах. Для потерянных слотов равен NULL, как и при |
True, если слот используется для декодирования подготовленных транзакций. Для физических слотов всегда false. |
56.20. 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 51.
Table 56.20. pg_replication_slots Columns
Column Type Description |
|---|
A unique, cluster-wide identifier for the replication slot |
The base name of the shared object containing the output plugin this logical slot is using, or null for physical slots. |
The slot type: |
The OID of the database this slot is associated with, or null. Only logical slots have an associated database. |
The name of the database this slot is associated with, or null. Only logical slots have an associated database. |
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. |
True if this slot is currently actively being used |
The process ID of the session using this slot if the slot is currently actively being used. |
The oldest transaction that this slot needs the database to retain. |
The oldest transaction affecting the system catalogs that this slot needs the database to retain. |
The address ( |
The address ( |
Availability of WAL files claimed by this slot. Possible values are:
The last two states are seen only when max_slot_wal_keep_size is non-negative. |
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 |
True if the slot is enabled for decoding prepared transactions. Always false for physical slots. |