1COMMIT PREPARED(7) PostgreSQL 12.6 Documentation COMMIT PREPARED(7)
2
3
4
6 COMMIT_PREPARED - commit a transaction that was earlier prepared for
7 two-phase commit
8
10 COMMIT PREPARED transaction_id
11
13 COMMIT PREPARED commits a transaction that is in prepared state.
14
16 transaction_id
17 The transaction identifier of the transaction that is to be
18 committed.
19
21 To commit a prepared transaction, you must be either the same user that
22 executed the transaction originally, or a superuser. But you do not
23 have to be in the same session that executed the transaction.
24
25 This command cannot be executed inside a transaction block. The
26 prepared transaction is committed immediately.
27
28 All currently available prepared transactions are listed in the
29 pg_prepared_xacts system view.
30
32 Commit the transaction identified by the transaction identifier foobar:
33
34 COMMIT PREPARED 'foobar';
35
37 COMMIT PREPARED is a PostgreSQL extension. It is intended for use by
38 external transaction management systems, some of which are covered by
39 standards (such as X/Open XA), but the SQL side of those systems is not
40 standardized.
41
43 PREPARE TRANSACTION (PREPARE_TRANSACTION(7)), ROLLBACK PREPARED
44 (ROLLBACK_PREPARED(7))
45
46
47
48PostgreSQL 12.6 2021 COMMIT PREPARED(7)