1ROLLBACK PREPARED(7) PostgreSQL 13.4 Documentation ROLLBACK PREPARED(7)
2
3
4
6 ROLLBACK_PREPARED - cancel a transaction that was earlier prepared for
7 two-phase commit
8
10 ROLLBACK PREPARED transaction_id
11
13 ROLLBACK PREPARED rolls back a transaction that is in prepared state.
14
16 transaction_id
17 The transaction identifier of the transaction that is to be rolled
18 back.
19
21 To roll back a prepared transaction, you must be either the same user
22 that executed the transaction originally, or a superuser. But you do
23 not 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 rolled back immediately.
27
28 All currently available prepared transactions are listed in the
29 pg_prepared_xacts system view.
30
32 Roll back the transaction identified by the transaction identifier
33 foobar:
34
35 ROLLBACK PREPARED 'foobar';
36
38 ROLLBACK PREPARED is a PostgreSQL extension. It is intended for use by
39 external transaction management systems, some of which are covered by
40 standards (such as X/Open XA), but the SQL side of those systems is not
41 standardized.
42
44 PREPARE TRANSACTION (PREPARE_TRANSACTION(7)), COMMIT PREPARED
45 (COMMIT_PREPARED(7))
46
47
48
49PostgreSQL 13.4 2021 ROLLBACK PREPARED(7)