Greetings:

I am working on converting a transportation application from a Progress 
database to PostgreSQL. This application will be hammered by about 75 users 
at any given time. Also, depending on the operation, there are many record 
updates that occur at the trigger level. I would like to be able to provide 
feedback to the user when they select a row for update (using SELECT FOR 
UPDATE). At present, if the row is being accessed (with SELECT FOR UPDATE) by 
another user, the application just sits there waiting. I spent some time 
looking at pg_locks hoping to be able to gain information from that table so 
as to programically return something to the user. The stuff I read didn't 
look promising. The only thing I've been able to come up with is having my 
own "lock" table and inserting a row into it containing the table name, the 
pid, the oid of the row, the user id, and a time stamp. Of course, I'm 
searching lock table entries before selecting for update and reporting a lock 
situation to the user if I find anything. I'm just wondering if I can use 
some system table or combination of tables to provide the feed back I need. 
Does anyone have any ideas about how to accomplish this? I searched the FAQ 
and didn't find anything.

 PostgreSQL 7.3.6-RH on i386-redhat-linux-gnu, compiled by GCC 
i386-redhat-linux-gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-39)

Thanks...
-- 
Quote: 32
"The world we have created is a product of our thinking. It cannot be
 changed without changing our thinking."

 --Albert Einstein

 Work: 1-336-372-6812
 Cell: 1-336-363-4719
email: [EMAIL PROTECTED]

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to