COMMIT_PREPARED(7pg15)
π COMMIT PREPARED π
okay bestie, this is the COMMIT PREPARED(7) page β you might also know it as COMMIT_PREPARED(7pg15) β from the PostgreSQL 15.19 documentation β¨ it's all about committing a transaction that was earlier prepared for two-phase commit. lowkey short, highkey important, so let's get into it π
πΈ NAME πΈ
COMMIT_PREPAREDβ commit a transaction that was earlier prepared for two-phase commit. that's the assignment, and it ate π«Ά
π¦ SYNOPSIS π¦
COMMIT PREPARED transaction_id
π DESCRIPTION π
okay so COMMIT PREPARED commits a transaction that is in prepared state. literally that. it's the "commit this prepared one" command, and it's giving very focused main-character energy π§
β¨ PARAMETERS β¨
transaction_idβ the transaction identifier of the transaction that is to be committed. that's the one getting committed, bestie π
π₯ NOTES π₯
- to commit a prepared transaction, you must be either the same user that executed the transaction originally, or a superuser. but plot twist: you do not have to be in the same session that executed the transaction π
- > π¨ no cap: this command cannot be executed inside a transaction block. the prepared transaction is committed immediately.
- all currently available prepared transactions are listed in the
pg_prepared_xactssystem view. use it for your vibe check π
π EXAMPLES π
commit the transaction identified by the transaction identifier foobar:
COMMIT PREPARED 'foobar';
π COMPATIBILITY π
COMMIT PREPARED is a PostgreSQL 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. iykyk π
π«Ά SEE ALSO π«Ά
PREPARE TRANSACTION(PREPARE_TRANSACTION(7))ROLLBACK PREPARED(ROLLBACK_PREPARED(7))
xoxo, that's the COMMIT PREPARED(7) page from the PostgreSQL 15.19 docs, dated 2026 β slay, periodt π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql15 15.19-160000.1.1 Β· PostgreSQL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms