PostgreSQL: Documentation: 17: 66.4. Two-Phase Transactions
PostgreSQL supports a two-phase commit (2PC) protocol that allows multiple distributed systems to work together in a transactional manner. The commands are PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED. Two-phase transactions are intended for use by external transaction management systems. PostgreSQL follows the features and model proposed by the X/Open XA standard, but does not implement some less often used aspects. When the user executes PREPARE TRANSACTION, the only possible next commands are COMMIT PREPARED or ROLLBACK PREPARED. In general, this prepared state is intended to be of very short duration, but external availability issues might mean transactions stay in this state for an extended interval. Short-lived prepared transactions are stored only in shared memory and WAL. Transactions that span checkpoints are recorded in the pg_twophase directory. Transactions that are currently prepared can be inspected using pg_prepared_xacts. If you see anything in the documen
PostgreSQL supports a two-phase commit (2PC) protocol that allows multiple distributed systems to work together in a transactional manner. The commands are PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED. Two-phase transactions are intended for use by external transaction management systems. PostgreSQL follows the features and model proposed by the X/Open XA standard, but does not implement some less often used aspects. When the user executes PREPARE TRANSACTION, the only possible next commands are COMMIT PREPARED or ROLLBACK PREPARED. In general, this prepared state is intended…
saved by
related reading
- Exploring versions of the Postgres logical replication protocolblog.peerdb.io
- PostgreSQL: Documentation: 18: 54.1. Overviewpostgresql.org
- PostgreSQL: Documentation: 18: 54.5. Logical Streaming Replication Protocolpostgresql.org
- 28.3. Write-Ahead Logging (WAL)postgresql.org
- Postgres WAL Files and Sequence Numbers | Crunchy Data Blogcrunchydata.com
- DBMS Musings: It’s Time to Move on from Two Phase Commitdbmsmusings.blogspot.com
- Overcoming Pitfalls of Postgres Logical Decodingblog.peerdb.io
- PostgreSQL CDC - RisingWavedocs.risingwave.com
- Ingest data from self-hosted PostgreSQL | Materialize Documentationmaterialize.com
- 8.20. pg_lsn Typepostgresql.org
- Three-phase commit protocolen.wikipedia.org
- An Overview of Distributed PostgreSQL... | Crunchy Data Blogcrunchydata.com