Re: Problem with committing in XA mode

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Problem with committing in XA mode
Дата
Msg-id 496F3A13.8050905@enterprisedb.com
обсуждение исходный текст
Ответы Re: Problem with committing in XA mode  (Vlastimil Havranek <vlastimil.havranek@xitee.com>)
Список pgsql-jdbc
Vlastimil Havranek wrote:
> I am facing tx timeout problem when committing certain tx in XA mode
> using pure postgre jdbc type 4 driver. The tx is issued/started from
> within backend deployed on AS BEA Weblogic 10 MP1.
> Ive tried the postgresql-jdbc-8.3-603 jdbc driver, the one bundled with
> weblogic and also edb jdbc driver.
> In all cases, i see this in db server log:
>    --
>    2009-01-13 13:37:50 LOG:  duration: 0.000 ms  parse <unnamed>:
> PREPARE TRANSACTION '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:37:50 LOG:  duration: 0.000 ms  bind <unnamed>: PREPARE
> TRANSACTION '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:37:50 LOG:  duration: 0.000 ms  execute <unnamed>:
> PREPARE TRANSACTION '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:37:51 LOG:  duration: 0.000 ms  parse <unnamed>: COMMIT
> PREPARED '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:37:51 LOG:  duration: 0.000 ms  bind <unnamed>: COMMIT
> PREPARED '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:37:51 ERROR:  prepared transaction with identifier
> "48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU=" does not exist
>    2009-01-13 13:37:51 STATEMENT:  COMMIT PREPARED
> '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:38:51 LOG:  duration: 0.000 ms  parse <unnamed>: COMMIT
> PREPARED '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:38:51 LOG:  duration: 0.000 ms  bind <unnamed>: COMMIT
> PREPARED '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='
>    2009-01-13 13:38:51 ERROR:  prepared transaction with identifier
> "48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU=" *does not exist*
>    2009-01-13 13:38:51 STATEMENT:  COMMIT PREPARED
> '48801_AQeOE4t3Z6MjBA==_Q3ZoYXZyYW5la2pkYmNEU0xpdmU='

Hmm, that's odd. A PREPARE TRANSACTION is clearly being run, and
followed by a COMMIT PREPARED with the same transaction id, which fails.
This raises two questions:

1. Why does it say the transaction doesn't exist, and
2. why doesn't Weblogic report error when the first COMMIT PREPARED fails?

Is there anything in the PostgreSQL server log? Could you set
log_statement='all' so that we get a trace of the statements from the
server side? (that logs *all* queries to the log, so will generate a lot
of log if the system is busy)

A possible explanation for 2. is that since the transaction was
successfully prepared, the RM should be able to commit it eventually. So
instead of propagating errors in commit, WebLogic just retries.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Support of getting generated keys in driver version 8.4devel
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Problem with committing in XA mode