バージョンごとのドキュメント一覧

54.19. pg_replication_slots #

The <structname>pg_replication_slots</structname> view provides a listing of all replication slots that currently exist on the database cluster, along with their current state. pg_replication_slotsは、現在存在するデータベースクラスタとその状態、全てのレプリケーションスロットの一覧を提供します。

For more on replication slots, see <xref linkend="streaming-replication-slots"/> and <xref linkend="logicaldecoding"/>. レプリケーションスロットに関する詳細は、27.2.6第49章を参照してください。

表54.19 pg_replication_slotsの列

<title><structname>pg_replication_slots</structname> Columns</title>

Column 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 this logical slot is using, or null for physical slots. 出力プラグインに使用されている論理スロットまたは物理スロットの場合はNULL、を含む共有オブジェクトの基底名。

slot_type text

The slot type: <literal>physical</literal> or <literal>logical</literal> スロットのタイプ:physicalまたはlogical

datoid oid (references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>oid</structfield>) (参照先 pg_database.oid

The OID of the database this slot is associated with, or null. Only logical slots have an associated database. このスロットと関連しているデータベースのOID、またはNULL。論理スロットだけがデータベースと関連を持つことができます。

database name (references <link linkend="catalog-pg-database"><structname>pg_database</structname></link>.<structfield>datname</structfield>) (参照先 pg_database.datname

The name of the database this slot is associated with, or null. Only logical slots have an associated database. このスロットと関連しているデータベース名、またはNULL。論理スロットだけがデータベースと関連を持つことができます。

temporary bool

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の場合は、これが一時レプリケーションスロットである。 一時スロットはディスクに保存されず、エラーのとき、またはセッションが終了したときには自動的に削除されます。

active bool

True if this slot is currently actively being used trueの場合は、このスロットが現在アクティブで使用されている

active_pid int4

The process ID of the session using this slot if the slot is currently actively being used. <literal>NULL</literal> if inactive. このスロットが現在アクティブで使用されている場合は、スロットを使用しているセッションのプロセスID。アクティブでなければNULL

xmin xid

The oldest transaction that this slot needs the database to retain. <literal>VACUUM</literal> cannot remove tuples deleted by any later transaction. このスロットがデータベースとの接続を必要としている最も古いトランザクション。 VACUUM は後でトランザクションによって削除されたタプルを除去できません。

catalog_xmin xid

The oldest transaction affecting the system catalogs that this slot needs the database to retain. <literal>VACUUM</literal> cannot remove catalog tuples deleted by any later transaction. このスロットがデータベースとの接続を必要としている、システムカタログに影響する最も古いトランザクション。 VACUUMは後でトランザクションによって削除されたカタログのタプルを除去できません。

restart_lsn pg_lsn

The address (<literal>LSN</literal>) of oldest WAL which still might be required by the consumer of this slot and thus won't be automatically removed during checkpoints unless this LSN gets behind more than <xref linkend="guc-max-slot-wal-keep-size"/> from the current LSN. <literal>NULL</literal> if the <literal>LSN</literal> of this slot has never been reserved. 消費者のスロットによって必要とされており、LSNが現在のLSNからmax_slot_wal_keep_size以上遅れていない限り、チェックポイント中に自動的に削除されない最古のアドレス(LSN)です。 このスロットのLSNが保存されていなければNULLです。

confirmed_flush_lsn pg_lsn

The address (<literal>LSN</literal>) up to which the logical slot's consumer has confirmed receiving data. Data corresponding to the transactions committed before this <literal>LSN</literal> is not available anymore. <literal>NULL</literal> for physical slots. 利用者がデータの受信を確認できている論理スロットのアドレス(LSN)。 このLSNより前にコミットされたトランザクションに対応するデータは、もはや有効ではありません。 物理スロットの場合はNULL

wal_status text

Availability of WAL files claimed by this slot. Possible values are: このスロットが報告するWALファイルの入手可能性。 可能な値は以下です。

  • <para><literal>reserved</literal> means that the claimed files are within <varname>max_wal_size</varname>.</para>

    reserved。報告されたファイルはmax_wal_size内であることを意味します。

  • <para><literal>extended</literal> means that <varname>max_wal_size</varname> is exceeded but the files are still retained, either by the replication slot or by <varname>wal_keep_size</varname>.

    extendedmax_wal_sizeは超えているものの、ファイルはレプリケーションスロットあるいはwal_keep_sizeによって保存されていることを意味します。

  • <literal>unreserved</literal> means that the slot no longer retains the required WAL files and some of them are to be removed at the next checkpoint. This state can return to <literal>reserved</literal> or <literal>extended</literal>. unreserved。そのスロットはもはや要求されたWALファイルが保存されず、次のチェックポイントでそのうちいくつかは削除される予定であることを意味します。 この状態はreservedまたはextendedに戻すことができます。

  • <literal>lost</literal> means that some required WAL files have been removed and this slot is no longer usable. lost。必要なWALファイルの一部が削除されており、このスロットはもはや利用可能ではないことを意味します。

The last two states are seen only when <xref linkend="guc-max-slot-wal-keep-size"/> is non-negative. If <structfield>restart_lsn</structfield> is NULL, this field is null. 最後の2つの状態は、max_slot_wal_keep_sizeが非負の場合にのみ起こります。 restart_lsnがNULLなら、このフィールドはNULLです。

safe_wal_size int8

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 <varname>max_slot_wal_keep_size</varname> is <literal>-1</literal>. 「ロスト」状態に陥る危険性のないスロットにおいて、WALに書き込むことのできるバイト数です。 失われたスロットに対して、あるいはmax_slot_wal_keep_size-1ならNULLです。

two_phase bool

True if the slot is enabled for decoding prepared transactions. Always false for physical slots. trueの場合は、準備されたトランザクションのデコーディングのためにスロットが有効。 物理スロットでは常にfalse。

conflicting bool

True if this logical slot conflicted with recovery (and so is now invalidated). Always NULL for physical slots. trueの場合は、この論理スロットがリカバリと競合している(したため、無効になっている)。 物理スロットでは常にNULL。