mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-17 02:53:51 +08:00
This commit adds the ability to open remote transactions that share transactional semantics with the ongoing local transaction. This is done by adding txn hooks to the local transaction that performs txn commands on remote nodes. This commit adds the 1pc variant of the commit protocol. A 2-pc variant is going to be added in an upcoming PR. The 1pc variant exists mostly for performance testing (i.e. how much is the 2pc penalty). But, there are also cases where 1pc is good enough (non-critical data and/or data backed by Kafka). Note that the remote_txn test is not run during sanitizer tests due to an apparent bug in PostgreSQL. (The test fails on an assertion of a global variable `AbortStartTime`, which is non-atomic although read across the ServerLoop and signal handlers.)