From: | "Gerlits Andrs" <gerlits(at)neotek(dot)hu> |
---|---|
To: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Synchronization issues with pg73jdbc3.jar and pg73jdbc2ee.jar |
Date: | 2003-05-26 17:35:35 |
Message-ID: | 20030526173535.30067.qmail@neotek.hu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Attached you'll find a simple multi-threaded example of a couple of
SERIALIZABLE transactions. I hope, I'm not making a complete ass of myself,
but it seems that the JDBC driver is unprepared to handle simultaneous
SERIALIZABLE transactions.
The table structure to test with is really simple:
CREATE TABLE test (
id integer UNIQUE NOT NULL
);
The program tries to access the database for the highest id available, then
use it in a preparedstatement.
(The reason we do that is to prepare for the worst DB server available, we
know that there are other ways to do this in postgres.)
It first opens the connections, stores them, than hands them to the threads.
No connection is issued twice simultaneously.
Please edit the variables at the top, but check not to have more
InserterThreads than dbConnections.
Thanks
Andras Gerlits
Attachment | Content-Type | Size |
---|---|---|
Inserter.java | application/octet-stream | 3.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2003-05-26 18:30:50 | Re: Synchronization issues with pg73jdbc3.jar and pg73jdbc2ee.jar |
Previous Message | Barry Lind | 2003-05-26 17:05:55 | Re: PGSQL Connection |