From: | "Sriram Dandapani" <sdandapani(at)counterpane(dot)com> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | number of transactions doubling |
Date: | 2006-09-28 21:51:24 |
Message-ID: | 6992E470F12A444BB787B5C937B9D4DF060E5AD6@ca-mail1.cis.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-jdbc |
Hi
I have a strange problem with the number of transactions generated
within my application. I use jdbc batching to submit insert statements
from a jboss app server to postgres 8.1.2.
A batch can have from 100 to 3000 inserts.
I noticed the following:
When I run the following query
select current_timestamp,datname,age(datfrozenxid) from pg_database;
The age columns shows say 1,500,000,000
When I run the same query after say 10 minutes, it shows 1,500,600,000
I have issued about 40,000 inserts via jdbc batching in 10 minutes.
It appears that the jdbc driver is generating twice the number of
transactions as inserts. This behaviour appears consistent with the
number of inserts that I generate
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.
The mystery is why am I seeing double the number of transactions being
generated.
This is causing transaction id wraparound limits to be approached
quicker than I would like.
From | Date | Subject | |
---|---|---|---|
Next Message | Sriram Dandapani | 2006-09-28 22:07:07 | autovacuum ignore tables |
Previous Message | Jim C. Nasby | 2006-09-28 19:29:10 | Re: transaction id wraparound |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2006-09-28 22:24:28 | Re: [JDBC] number of transactions doubling |
Previous Message | Jim C. Nasby | 2006-09-28 18:54:21 |