COMMIT_PREPARED(7pg16)
π COMMIT PREPARED π
okay bestie, welcome to the COMMIT_PREPARED(7pg16) page β sheβs giving βfinish what you startedβ energy and honestly? iconic. π
β¨ NAME β¨
COMMIT_PREPARED β commit a transaction that was earlier prepared for two-phase commit. periodt. π
πΈ SYNOPSIS πΈ
COMMIT PREPARED transaction_id
π¦ DESCRIPTION π¦
COMMIT PREPARED commits a transaction that is in prepared state. literally the final βyes bestie, lock it inβ move. β
π PARAMETERS π
transaction_idβ the transaction identifier of the transaction that is to be committed. no cap, thatβs the one youβre sealing the deal on.
π NOTES π
- To commit a prepared transaction, you must be either the same user that executed the transaction originally, or a superuser. But you do not have to be in the same session that executed the transaction. so likeβ¦ authorized bestie privileges only, but not necessarily the same group chat. π«Ά
- This command cannot be executed inside a transaction block. the prepared transaction is committed immediately. absolutely no nesting, she said βone clean commit, no layers.β π
- All currently available prepared transactions are listed in the
pg_prepared_xactssystem view. thatβs your little guest list, iykyk. π
π₯ 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. so sheβs useful, sheβs external-transaction-management-coded, and sheβs not playing by one universal SQL rulebook. πβ¨
β SEE ALSO β
PREPARE TRANSACTION(PREPARE_TRANSACTION(7))ROLLBACK PREPARED(ROLLBACK_PREPARED(7))
k bye bestie, this was PostgreSQL 16.15, dated 2026 β stay committed, but likeβ¦ transactionally. ππ
π¦ where this page comes from
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-160000.1.1 Β· PostgreSQL
- opensuse-leap 16.0: postgresql16 16.15-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