Re: [JDBC] number of transactions doubling
Re: [JDBC] number of transactions doubling
От:
"Sriram Dandapani" <sdandapani@counterpane.com>
Дата:
Autocommit is set to off once a connection is obtained from the jboss pool. It is turned back on when it is closed (so that any idle transactions are committed). I had the following 2 lines in my postgres-ds.xml which I commented Even after this, I am seeing twice the number of transactions. -----Original Message----- From: Oliver Jowett [mailto:oliver@opencloud.com] Sent: Thursday, September 28, 2006 3:24 PM To: Sriram Dandapani Cc: pgsql-jdbc@postgresql.org; pgsql-admin@postgresql.org Subject: Re: [JDBC] number of transactions doubling Sriram Dandapani wrote: > The target table has triggers that route data to appropriate tables. The > tables to which data is routed has check constraints that do further > inserts. (All of this happens in 1 jdbc transaction) > > I expect JDBC Batching to generate fewer transactions depending on > batch size. Have you turned autocommit off? -O
Re: [JDBC] number of transactions doubling
От:
Oliver Jowett <oliver@opencloud.com>
Дата:
Sriram Dandapani wrote: > Autocommit is set to off once a connection is obtained from the jboss > pool. It is turned back on when it is closed (so that any idle > transactions are committed). Don't know what to suggest then -- if autocommit is off then the JDBC driver should be sending BEGIN before the first query & COMMIT or ROLLBACK when you explicitly delimit a transaction. There's nothing special about batches. You could set loglevel=2 as a JDBC URL parameter to see exactly what the JDBC driver is sending, perhaps. Or turn on logging on the server side, though I'm not sure at exactly which server version the logging of the extended query protocol became useful. -O