1ROLLBACK PREPARED() SQL Commands ROLLBACK PREPARED()
2
3
4
6 ROLLBACK PREPARED - cancel a transaction that was earlier prepared for
7 two-phase commit
8
9
11 ROLLBACK PREPARED transaction_id
12
13
15 ROLLBACK PREPARED rolls back a transaction that is in prepared state.
16
18 transaction_id
19 The transaction identifier of the transaction that is to be
20 rolled back.
21
23 To roll back a prepared transaction, you must be either the same user
24 that executed the transaction originally, or a superuser. But you do
25 not have to be in the same session that executed the transaction.
26
27 This command cannot be executed inside a transaction block. The pre‐
28 pared transaction is rolled back immediately.
29
30 All currently available prepared transactions are listed in the pg_pre‐
31 pared_xacts system view.
32
34 Roll back the transaction identified by the transaction identifier foo‐
35 bar:
36
37 ROLLBACK PREPARED 'foobar';
38
39
41 PREPARE TRANSACTION [prepare_transaction(7)], COMMIT PREPARED [com‐
42 mit_prepared(l)]
43
44
45
46SQL - Language Statements 2008-06-08 ROLLBACK PREPARED()