]> begriffs open source - ai-pg/blob - full-docs/txt/sql-rollback-prepared.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / sql-rollback-prepared.txt
1
2 ROLLBACK PREPARED
3
4    ROLLBACK PREPARED — cancel a transaction that was earlier prepared for
5    two-phase commit
6
7 Synopsis
8
9 ROLLBACK PREPARED transaction_id
10
11 Description
12
13    ROLLBACK PREPARED rolls back a transaction that is in prepared state.
14
15 Parameters
16
17    transaction_id
18           The transaction identifier of the transaction that is to be
19           rolled back.
20
21 Notes
22
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
28    prepared transaction is rolled back immediately.
29
30    All currently available prepared transactions are listed in the
31    pg_prepared_xacts system view.
32
33 Examples
34
35    Roll back the transaction identified by the transaction identifier
36    foobar:
37 ROLLBACK PREPARED 'foobar';
38
39 Compatibility
40
41    ROLLBACK PREPARED is a PostgreSQL extension. It is intended for use by
42    external transaction management systems, some of which are covered by
43    standards (such as X/Open XA), but the SQL side of those systems is not
44    standardized.
45
46 See Also
47
48    PREPARE TRANSACTION, COMMIT PREPARED