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

54.16. pg_prepared_xacts #

The view <structname>pg_prepared_xacts</structname> displays information about transactions that are currently prepared for two-phase commit (see <xref linkend="sql-prepare-transaction"/> for details). pg_prepared_xactsビューは、現状で2相コミットのためにプリペアードトランザクションについての情報を表示します(詳細はPREPARE TRANSACTIONを参照してください)。

<structname>pg_prepared_xacts</structname> contains one row per prepared transaction. An entry is removed when the transaction is committed or rolled back. pg_prepared_xactsは、プリペアードトランザクション毎に1つの行を含みます。 この項目はトランザクションがコミットもしくはロールバックされたときに削除されます。

表54.16 pg_prepared_xactsの列

<title><structname>pg_prepared_xacts</structname> Columns</title>

Column Type 列 型

Description 説明

transaction xid

Numeric transaction identifier of the prepared transaction プリペアードトランザクションに対する数値のトランザクション識別子

gid text

Global transaction identifier that was assigned to the transaction トランザクションに割り当てられたグローバルのトランザクション識別子

prepared timestamptz

Time at which the transaction was prepared for commit トランザクションがコミットのために準備された時間

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

Name of the user that executed the transaction トランザクションを実行したユーザ名

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

Name of the database in which the transaction was executed トランザクションを実行したデータベース名


When the <structname>pg_prepared_xacts</structname> view is accessed, the internal transaction manager data structures are momentarily locked, and a copy is made for the view to display. This ensures that the view produces a consistent set of results, while not blocking normal operations longer than necessary. Nonetheless there could be some impact on database performance if this view is frequently accessed. pg_prepared_xactsビューにアクセスすると、内部のトランザクション管理データ構造が一時的にロックされます。 そして表示用にコピーが作成されます。 これは、必要以上に長く通常の操作をブロックさせずに、ビューが一貫性のある結果を生成することを保証します。 このビューが頻繁にアクセスされると、データベースの性能になんらかの影響を及ぼします。