ROLLBACK PREPARED <refpurpose>cancel a transaction that was earlier prepared for two-phase commit</refpurpose> — 二相コミット用に事前に準備されたトランザクションを取り消す
ROLLBACK PREPARED transaction_id
   <command>ROLLBACK PREPARED</command> rolls back a transaction that is in
   prepared state.
ROLLBACK PREPAREDは、準備された状態のトランザクションをロールバックします。
  
transaction_idThe transaction identifier of the transaction that is to be rolled back. ロールバックさせるトランザクションのトランザクション識別子です。
To roll back a prepared transaction, you must be either the same user that executed the transaction originally, or a superuser. But you do not have to be in the same session that executed the transaction. 準備されたトランザクションをロールバックするには、トランザクションを元々実行したユーザかスーパーユーザでなければなりません。 しかし、トランザクションを実行したのと同じセッション内で実行する必要はありません。
This command cannot be executed inside a transaction block. The prepared transaction is rolled back immediately. このコマンドはトランザクションブロック内では実行できません。 準備されたトランザクションは即座にロールバックされます。
   All currently available prepared transactions are listed in the
   <link linkend="view-pg-prepared-xacts"><structname>pg_prepared_xacts</structname></link>
   system view.
現在利用できるすべての準備されたトランザクションはpg_prepared_xactsシステムビュー内に列挙されています。
  
   Roll back the transaction identified by the transaction
   identifier <literal>foobar</literal>:
トランザクション識別子foobarで識別されるトランザクションをロールバックします。
ROLLBACK PREPARED 'foobar';
   <command>ROLLBACK PREPARED</command> is a
   <productname>PostgreSQL</productname> extension.  It is intended for use by
   external transaction management systems, some of which are covered by
   standards (such as X/Open XA), but the SQL side of those systems is not
   standardized.
ROLLBACK PREPAREDはPostgreSQLの拡張です。
これは外部のトランザクション管理システムによる利用を意図したものです。
ただし外部のトランザクション管理システムの中には標準化されたもの(X/Open XAなど)もありますが、こうしたシステムでもSQL側は標準化されていません。