XA Xid to PostgreSQL transaction ID

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема XA Xid to PostgreSQL transaction ID
Дата
Msg-id AANLkTikWBOaQ+2GXsGa2Mbq46mDK8CgwcU7yVkpkcVEg@mail.gmail.com
обсуждение исходный текст
Ответы Re: XA Xid to PostgreSQL transaction ID
Список pgsql-jdbc
Hello,

I have implemented two-phase commit into the Python PostgreSQL driver
psycopg2. As the Python DBAPI is XA inspired, the transaction IDs it
demands to handle are composed by triples (format_id, gtrid, bqual).
PostgreSQL instead asks for plain strings as transaction IDs.

I'd like to implement the mapping algorithm exactly the way the JDBC
driver does, as it would allow tools written in Python to interoperate
to ones written in Java and understand each other the XA components of
the transaction IDs.

I've found the implementation of the mapping in JDBC in [1] and I've
reimplemented it. I'd like to double check that the results actually
match.

As a test I have in the test suite the triple (42, 'gtrid', 'bqual')
is converted into the string '42_Z3RyaWQ=_YnF1YWw=': I'd like to know,
if possible, if this is the same result obtained by the JDBC driver.
Alternatively, if you can provide me one or more known triple ->
string transformation examples, I can check them and add them to the
test suite.

Thank you very much. Best regards.


-- Daniele


[1] http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/jdbc/pgjdbc/org/postgresql/xa/RecoveredXid.java?rev=1.2

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [HACKERS] Support for JDBC setQueryTimeout, et al.
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [HACKERS] Support for JDBC setQueryTimeout, et al.