COMMIT_PREPARED(7pg15)

πŸ“¦ version 15.19, in opensuse-leap 16.0

πŸ’– 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_xacts system 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 🫢


xoxo, that's the COMMIT PREPARED(7) page from the PostgreSQL 15.19 docs, dated 2026 β€” slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from