From: | Tigran Mkrtchyan <tigran(dot)mkrtchyan(at)desy(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | transactions getting slon in councurrent environment |
Date: | 2006-12-28 12:12:22 |
Message-ID: | 4593B4A6.20202@desy.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Dear PostgreSQL gurus,
I got a incorrect or unexpected behavior in concurrent environment.
Luckily, I was able to localize it and create an example:
My setup:
Postgres 8.2 ( with 8.1 the same effect )
Linux ( with Solaris the same effect )
java 1.5, JDBC driver 8.2-504.jdbc3 ( with earlier versions the same effect )
The table:
create table t_jtest (
ikey CHAR(36) primary key,
ivalue integer not null
);
The appication:
Client 1:
autocommit off
loop:
INSERT INTO t_jtest VALUES (?,?)
UPDATE t_jtest SET ivalue=? where ikay=?
commit
Client 2:
autocommit off
"SELECT COUNT(*) FROM t_jtest"
do nothing
The effect is that time, which is needed by Client 1 is growing, unless I add a
commit into client 2.
Is it normal behavior?
Both application attached. To run:
javac *.java
in terminal 1:
java -cp postgresql-8.2-504.jdbc3.jar DbIject
in terminal 2:
ava -cp postgresql-8.2-504.jdbc3.jar Spy
Regards,
Tigran.
________________________________________________________________________
Tigran Mkrtchyan DESY, IT,
tigran(dot)mkrtchyan(at)desy(dot)de Notkestrasse 85,
Tel: + 49 40 89983946 Hamburg 22607,
Fax: + 49 40 89984429 Germany.
Attachment | Content-Type | Size |
---|---|---|
DbIject.java | text/x-java | 1.8 KB |
Spy.java | text/x-java | 918 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Theodore Petrosky | 2006-12-28 13:26:24 | Re: BUG #2867: FULL PATH name problem |
Previous Message | Tom Lane | 2006-12-28 01:17:50 | Re: BUG #2867: FULL PATH name problem |