Skip site navigation (1) Skip section navigation (2)

transactions getting slon in councurrent environment

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 (view raw or flat)
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: Spy.java
Description: text/x-java (918 bytes)
Attachment: DbIject.java
Description: text/x-java (1.8 KB)

Responses

pgsql-bugs by date

Next:From: Theodore PetroskyDate: 2006-12-28 13:26:24
Subject: Re: BUG #2867: FULL PATH name problem
Previous:From: Tom LaneDate: 2006-12-28 01:17:50
Subject: Re: BUG #2867: FULL PATH name problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group