-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Support XA distributed transactions in CockroachDB #22329
Copy link
Copy link
Closed
Labels
A-kv-clientRelating to the KV client and the KV interface.Relating to the KV client and the KV interface.A-sql-executorSQL txn logicSQL txn logicA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV TeamKV Team
Description
X/Open XA is a standard for distributed transaction processing across multiple database engines. This is used in enterprise scenarios where data is spread across different technologies but applications need to preserve ACID semantics for transactions that span multiple database engines.
PostgreSQL supports XA transactions by a combination of two mechanisms:
- internally it supports the
PREPARE TRANSACTIONstatement which enables a SQL transaction manager (TM) to "take over" transaction management - the official pg ODBC driver contains an implementation of the standard MSDTP API (Microsoft's view on what XA should look like), so that pg becomes interoperable with other MSDTP-aware databases.
- ditto JDBC
For enterprise users CockroachDB should provide a path towards XA compatibility:
- provide a mechanism / API so that an external TM can take over transaction control in CockroachDB
- provide one or more driver extension that interoperates with one or more industry standard API (perhaps MSDTP or the java equivalent)
Strict compatibility with pg's PREPARE TRANSACTION would enable providing a XA API via pg's own ODBC driver.
cc @awoods187 for prioritization. cc @bdarnell for technical insights.
Also mentioned here: https://forum.cockroachlabs.com/t/xa-distributed-transactions/1336
Jira issue: CRDB-5863
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-kv-clientRelating to the KV client and the KV interface.Relating to the KV client and the KV interface.A-sql-executorSQL txn logicSQL txn logicA-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV TeamKV Team