XA Global Transaction Support for Aurora Postgres

0

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?

1 Answer
1

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!

AWS
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions