From: Rainer Mager <rmager@vgkk.com>
To: pgsql-admin@postgresql.org
Subject: Problem with JDBC transactions
Date: Wed, 7 Feb 2001 19:03:10 +0900
Message-ID: <NEBBJBCAFMMNIHGDLFKGCEKKCPAA.rmager@vgkk.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1001127141110.6198I-100000@cpark37.computerpark.co.uk>
Hi all,
We're having some pretty serious problems with transactions via JDBC. We're
running on Linux with PG 7.0.3 and Sun's 1.2.2 Java VM.
The issue is that we have a reasonably large number of connections to our
database (as much as 80 simultaneously although the problem happens even at
around 30). What happens is that we have a transaction that 1) deletes all
items from a table for a given user ID, 2) inserts in the new items for that
user ID. This is wrapped in a single transaction. The problem is that
sometimes, the insert fails because the delete didn't actually delete
(apparently). I've put in debugging info and doing a query before and after
the delete bears this out, this is, the delete sometimes doesn't delete.
I've also looked at the postgres logs but it is very difficult to tell
where 1 connectios transaction starts compared to a differenct connection. I
think it would be useful if all lines were labeled with some sort of
connection ID.
Any way, has anyone seen anything like this? And before you ask, yes, we're
quite sure the code properly starts and ends a connection (well, we think
we're sure anyway ;-).
The only possibility I've been able to come up with is if we're
inadvertantly using the same JDBC connection more than once at a time. I've
looked into this a lot and it does not seem to be the case.
Any help would be GREATLY appreciated.
Thanks in advance.
--Rainer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: rmager@vgkk.com
Subject: Re: Problem with JDBC transactions
In-Reply-To: <NEBBJBCAFMMNIHGDLFKGCEKKCPAA.rmager@vgkk.com>
References: <Pine.LNX.3.96.1001127141110.6198I-100000@cpark37.computerpark.co.uk> <NEBBJBCAFMMNIHGDLFKGCEKKCPAA.rmager@vgkk.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox