Feature #496
Implement reference PostgreSQL driver with XA two phase commit support
Status: | New | Start date: | 12/23/2019 | |
---|---|---|---|---|
Priority: | Normal (Code 4) | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - |
Description
Driver like:
- github.com/lib/pq — pure Go Postgres driver for database/sql. For a long time, this driver was the standard by default. Currently, it has lost its relevance and is not developed by its author.
or
- github.com/jackc/pgx — PostgreSQL driver and toolkit for Go. Today this tool is a better choice.
shall be branched and patched for support for XA transactions.
The principle of work could be following:
- Enduro/X Go ATMI Context shall be appended with database connection object, and have some function to SetConn()
- Basic XA switch could be implemented in endurox-go, this would perform the calls to SetConn() object. The Connection shall provide some xa end-points, like prepare, rollback, commit, etc...
- We need a C driver to resolve this switch
- We need to implement the the interface in Go PQ driver to provide the XA functions.