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

53.54. pg_subscription #

The catalog <structname>pg_subscription</structname> contains all existing logical replication subscriptions. For more information about logical replication see <xref linkend="logical-replication"/>. カタログpg_subscriptionには、存在するすべての論理レプリケーションのサブスクリプションが入ります。 論理レプリケーションについての詳細な情報は第31章を参照してください。

Unlike most system catalogs, <structname>pg_subscription</structname> is shared across all databases of a cluster: there is only one copy of <structname>pg_subscription</structname> per cluster, not one per database. ほとんどのシステムカタログとは異なり、pg_subscriptionはクラスタ内の全データベースで共有されます。 つまりクラスタごとにpg_subscriptionの実体は1つだけ存在し、データベースごとに1つではありません。

Access to the column <structfield>subconninfo</structfield> is revoked from normal users, because it could contain plain-text passwords. subconninfoには平文のパスワードが含まれる可能性があるため、一般ユーザによるアクセス権は取り消されています。

表53.54 pg_subscriptionの列

<title><structname>pg_subscription</structname> Columns</title>

Column Type 列 型

Description 説明

oid oid

Row identifier 行識別子

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

OID of the database that the subscription resides in サブスクリプションが存在するデータベースのOID

subskiplsn pg_lsn

Finish LSN of the transaction whose changes are to be skipped, if a valid LSN; otherwise <literal>0/0</literal>. 有効なLSNの場合は、変更がスキップされるトランザクションの終了LSN。 有効でない場合は0/0

subname name

Name of the subscription サブスクリプションの名前

subowner oid (references <link linkend="catalog-pg-authid"><structname>pg_authid</structname></link>.<structfield>oid</structfield>) (参照先 pg_authid.oid

Owner of the subscription サブスクリプションの所有者

subenabled bool

If true, the subscription is enabled and should be replicating trueの場合、サブスクリプションは有効でレプリケーションが行われています

subbinary bool

If true, the subscription will request that the publisher send data in binary format trueの場合、サブスクリプションはパブリッシャーに対してバイナリ形式でデータを送るように要求します

substream char

Controls how to handle the streaming of in-progress transactions: <literal>f</literal> = disallow streaming of in-progress transactions, <literal>t</literal> = spill the changes of in-progress transactions to disk and apply at once after the transaction is committed on the publisher and received by the subscriber, <literal>p</literal> = apply changes directly using a parallel apply worker if available (same as 't' if no worker is available) 進行中のトランザクションのストリーミングの取り扱い方法を制御します: f = 進行中のトランザクションのストリーミングを禁止、 t = 進行中のトランザクションの変更をディスクに書き出し、トランザクションがパブリッシャーでコミットされ、サブスクライバーに受け取られた後に一度に適用、 p = 使用可能な場合は、パラレル適用ワーカーを使用して変更を直接適用(使用可能なワーカーがない場合は「t」と同じ)

subtwophasestate char

State codes for two-phase mode: <literal>d</literal> = disabled, <literal>p</literal> = pending enablement, <literal>e</literal> = enabled 2相モードの状態コード: d = 無効、 p = 有効化待ち e = 有効

subdisableonerr bool

If true, the subscription will be disabled if one of its workers detects an error trueの場合、ワーカーのいずれかがエラーを検出するとサブスクリプションが無効になります。

subpasswordrequired bool

If true, the subscription will be required to specify a password for authentication trueの場合、サブスクリプションは認証のパスワードを指定する必要があります。

subrunasowner bool

If true, the subscription will be run with the permissions of the subscription owner trueの場合、サブスクリプションはサブスクリプション所有者の許可を得て運行されます。

subconninfo text

Connection string to the upstream database 上流のデータベースへの接続文字列

subslotname name

Name of the replication slot in the upstream database (also used for the local replication origin name); null represents <literal>NONE</literal> 上流のデータベースのレプリケーションスロットの名前(ローカルレプリケーションのオリジン名としても使われます)。 NULLはNONEを表します

subsynccommit text

The <varname>synchronous_commit</varname> setting for the subscription's workers to use サブスクリプションワーカーが使用するsynchronous_commitの設定値

subpublications text[]

Array of subscribed publication names. These reference publications defined in the upstream database. For more on publications see <xref linkend="logical-replication-publication"/>. サブスクライブされるパブリケーション名の配列です。 上流データベースで定義されたパブリケーションを参照します。 パブリケーションについての詳細は31.1を参照してください。

suborigin text

The origin value must be either <literal>none</literal> or <literal>any</literal>. The default is <literal>any</literal>. If <literal>none</literal>, the subscription will request the publisher to only send changes that don't have an origin. If <literal>any</literal>, the publisher sends changes regardless of their origin. オリジンの値は、noneまたはanyのいずれかにする必要があります。 デフォルトはanyです。 noneの場合、サブスクリプションはパブリッシャーに対して、オリジンがない変更のみを送信するように要求します。 anyの場合、パブリッシャーはオリジンに関係なく変更を送信します。