SELECT FOR UPDATE - release lock?

From: "Christian Hofmann" <christian(dot)hofmann(at)gmx(dot)de>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: SELECT FOR UPDATE - release lock?
Date: 2006-05-04 20:08:16
Message-ID: 00e801c66fb6$7b91edd0$7b00a8c0@taschenrechner
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

for some tables I am using a "select a,b,c from mytable where x='abc' FOR
UPDATE" query to prevent other servers also modify this data while I am
reading the data and decide to modify the data.

Now sometimes I don't want to make an update. Is there a way to release the
lock. Or is the lock released by simply call commit?

The problem is, that we are using collection pooling. So these datasets
(where x='xyz') would be blocked forever.
How would you solve this? What can i do?

Thank you,

Christian

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message operationsengineer1 2006-05-04 20:11:51 Re: SQL Order Question
Previous Message George Weaver 2006-05-04 20:07:55 Re: SQL Order Question