locking problem with JDBC (suspicion)

From: Anand Raman <araman(at)india-today(dot)com>
To: postgresql <pgsql-general(at)postgresql(dot)org>
Subject: locking problem with JDBC (suspicion)
Date: 2001-02-10 17:16:11
Message-ID: 20010210224611.A18138@india-today.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hi guys

I am facing problems with locks occasionally when using postgresql with
jdbc drivers..

I typically update a table exhibits which has 2 foreign keys from
artits table and a foreign key from atoday_users.. Sometimes this query simply hangs waiting for some
lock to be released.

This is a sample log entry which is generated when the process runs
smoothly..

StartTransactionCommand
query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values (611,1001,'trial sake',null,157,null)
ProcessQuery
query: SELECT oid FROM "artists" WHERE "artist_id" = $1 FOR UPDATE OF "artists"
query: SELECT oid FROM "atoday_users" WHERE "user_id" = $1 FOR UPDATE OF "atoday_users"
CommitTransactionCommand

this is the log entry which is generated when the process hangs..
StartTransactionCommand
query: insert into exhibits(exhibit_id,created_by,title,description,artist_id1,artist_id2) values (613,1001,'Painiting 1',null,56,null)
ProcessQuery
<<HANGS AFTER THIS>>

What could be the cause of this problem.. There arent many concurrent
transaction on the db engine.. Infact i am the only one who is using
this application now..

** MORE IMPORTANTG QUESTION **
Also why should insert into exhibits table lock a few rows from artists
and atoday_user for UPDATE.. Could this be the cause of the problem..

I am using 702..

Thanks
Anand

Browse pgsql-general by date

  From Date Subject
Next Message Bill Barnes 2001-02-10 18:20:20 Installing ~-tcl-7.0.3 in Mandrake 7.2
Previous Message Peniche Lopez Alfonso Jose 2001-02-10 17:11:14 Re: bug with distinct?