[BUGS] Two phase commit in ECPG

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема [BUGS] Two phase commit in ECPG
Дата
Msg-id CAD21AoDZTi+C06oF3-i15r-ZMx+cCx7PjK_m859YKA-08CbyHw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [BUGS] [HACKERS] Two phase commit in ECPG
Список pgsql-bugs
Hi all,

I found that ecpg has not been supporting COMMIT PREPARED and ROLLBACK
PREPARED since version 9.0.2.
For example, if the test code does,
  EXEC SQL BEGIN;
  EXEC SQL INSERT INTO t1 VALUES(1);
  EXEC SQL PREPARE TRANSACTION 'gxid';
  EXEC SQL COMMIT PREPARED 'gxid';
I got error "COMMIT PREPARED cannot run inside a transaction block".

This cause is that the "begin transaction" is issued automatically
before executing COMMIT PREPARED if we're not in auto commit. The
Commit 816b008eaf1a1ff1069f3bafff363a9a8bf04a21 fixed bug of incorrect
status calculation but at the same time it became the cause of this
behavior.
Is this a bug?

Attached 001 patch fixes this issue and add regression test for two
phase commit in ecpg.

Also, in spite of ecpg identifies these two commands as transaction
command similar to other transaction commands like commit and rollback
the documentation doesn't mentioned about these at all. Attached 002
patch add description about these to documentation.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] Error with Softlinks after using pg_upgrade
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14573: lateral joins, ambuiguity