XA Global Transaction Support for Aurora Postgres
Does AWS Aurora with postgresql engine support XA transactions meaning a transaction manager could do 2 phase commit operations on both the Aurora postgres as well as another messaging queue in a single transaction. Also if it is supported, does the XA transaction feature work with Aurora Global Database across multiple regions or does it work only within one region? Finally, does RDS postgres support the same XA transaction functionality and also if there are any constraints with that XA support between multi-region vs single region if at all it is supported on RDS postgres?
Both Aurora PostgreSQL and RDS PostgreSQL fully support the SQL capabilities of the open source community's PostgreSQL versions. PostgreSQL supports 2 phase commit (2PC) SQL operations for PREPARE TRANSACTION, COMMIT PREPARED and ROLLBACK PREPARED operations for transactions managed by an external Transaction Manager (TM). See the community PostgreSQL documentation at https://www.postgresql.org/docs/14/sql-prepare-transaction.html. These SQL Operations are available on all version of Aurora PostgreSQL and RDS PostgreSQL currently supported in AWS. Please note some of the nuances of using PREPARE TRANSACTION noted in documentation link above.
Aurora Global Database currently has an architecture with a single primary region where writes occur and up to five secondary regions which are read-only versions of the primary region's database and synchronized using asynchronous replication of log records managed at the Aurora Storage layer. Since all regions have the same data, albeit subject to very small replication lag, we do not need two-phase commit protocols. If you plan to use 2PC coordinating different types of Resource Managers (RM) such as different databases, message queues, etc. across different regions, you will need to carefully plan how to coordinate and deal with different cross-region data consistency models and timing. Certainly, your TM could manage transactions for independent RMs across regions but obviously there will be WAN latency considerations with this approach.
Hope this helps!
Relevant questions
XA Global Transaction Support for Aurora Postgres
asked 3 months agoChanges to connection handling with Aurora Postgres?
Accepted Answerasked 3 years agoPostGIS and Aurora compatibility: experience feedback
Accepted AnswerUpgrade for Amazon Aurora Serverless v1 PostgreSQL-compatible edition 10.x end of support is January 31, 2023
asked a month agoAurora for PostgreSQL plugin list
Accepted Answerasked 5 years agoAurora PostgreSQL write forwarding
Accepted Answerasked 2 years agoAurora Serverless MySQL - Supported Options
Accepted Answerasked 2 years agoChoosing RDS PostgreSQL over Aurora PostgreSQL
asked a month agoDoes Aurora Babelfish support Aurora Serverless?
Accepted Answerasked a month agoMajor Version Upgrade Aurora PostgreSQL 11
asked 2 years ago