apache / apache/shardingsphere

[Feature]Support to execute postgresql XA statement directly through proxy

Open
#24,414 2 comments 0 reactions 1 assignee Claimed by @luka2049 View on GitHub
db: PostgreSQL feature: transaction
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
11h 35m
Merged PRs (30d)
326

Description

## Feature Request
Hi community.
We want to support to execute postgresql XA statement directly through proxy.
If you are interested, welcome to complete it.

### Is your feature request related to a problem?
No.

### Describe the feature you would like.
Currently, Proxy supports users to directly execute MySQL XA statements, using Proxy as an RM, and multiple Proxies can be executed by opening XA transactions externally. Postgresql/openGauss needs a simple adaptation.

You can refer to `TransactionXAHandler`.

Postgresql xa syntax is as follows:
```sql
BEGIN;
-- execute your sql statements

-- xa prepare
PREPARE TRANSACTION 'test';

-- xa phase 2 (commit or rollback)
ROLLBACK PREPARED 'test';
COMMIT PREPARED 'test';

-- xa recovery
select * from pg_prepared_xacts;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.