Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

XA rollback problem



Hi,

All inserts or updates I do using PGXADatasource get rolled back
silently (no exceptions). I reproduced the problem using a simple test
table with a single int2-column.

As you can see in the driver logging it uses one-phase commit. I think
the problem is in the part that states *CommandStatus(ROLLBACK)*, the
driver just proceeds to ending and committing the transaction.

Does anyone have a clue how I would debug this further? I could not find
much XA-documentation on the site.

Thanks,

Niels

Query:
INSERT INTO test (test_id) VALUES (0)

Configuration:
Driver: both 404 and 405
Server: both 8.0 and 8.1
Tomcat: 5.5
Transactionmanager: SimpleJTA 1.04

Relevant logging:

-- DriverManager.setLogWriter(new PrintWriter(System.out));
-- Driver.setLogLevel(Driver.DEBUG);

XAResource 13d21d6: starting transaction xid =
SimpleXidImpl[format=1c131d0a,gtrid={txmgrId=TM1,txmgrBirthTime=11456292
11806,myBirthTime=1145629233910,id=13}, bqual={1}]
simple execute,
handler=org.postgresql.jdbc2.AbstractJdbc2Statement$StatementResultHandl
er(at)1d26552, maxRows=0, fetchSize=0, flags=5
 FE=> Bind(stmt=S_1,portal=null)
 FE=> Execute(portal=null,limit=0)
 FE=> Parse(stmt=null,query="INSERT INTO test (test_id) VALUES
(0)",oids={})
 FE=> Bind(stmt=null,portal=null)
 FE=> Describe(portal=null)
 FE=> Execute(portal=null,limit=1)
 FE=> Sync
 <=BE BindComplete [null]
 <=BE CommandStatus(BEGIN)
 <=BE ParseComplete [null]
 <=BE BindComplete [null]
 <=BE NoData
 <=BE CommandStatus(INSERT 0 1)
 <=BE ReadyForQuery(T)
simple execute,
handler=org.postgresql.jdbc2.AbstractJdbc2Connection$TransactionCommandH
andler(at)1fa157c, maxRows=0, fetchSize=0, flags=22
 FE=> Bind(stmt=S_2,portal=null)
 FE=> Execute(portal=null,limit=1)
 FE=> Sync
 <=BE BindComplete [null]
 <=BE CommandStatus(ROLLBACK)
 <=BE ReadyForQuery(I)
XAResource 13d21d6: ending transaction xid =
SimpleXidImpl[format=1c131d0a,gtrid={txmgrId=TM1,txmgrBirthTime=11456292
11806,myBirthTime=1145629233910,id=13}, bqual={1}]
XAResource 13d21d6: committing xid =
SimpleXidImpl[format=1c131d0a,gtrid={txmgrId=TM1,txmgrBirthTime=11456292
11806,myBirthTime=1145629233910,id=13}, bqual={1}] (one phase)



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group