Re: SELECT FOR UPDATE - release lock?

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Christian Hofmann <christian(dot)hofmann(at)gmx(dot)de>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: SELECT FOR UPDATE - release lock?
Date: 2006-05-04 20:21:26
Message-ID: 20060504202126.GB25362@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, May 04, 2006 at 22:08:16 +0200,
Christian Hofmann <christian(dot)hofmann(at)gmx(dot)de> wrote:
> 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?

Locks are released when transactions end.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joao Miguel Ferreira 2006-05-05 12:30:46 what are the pg_clog and pg_xlog directories ?
Previous Message operationsengineer1 2006-05-04 20:21:15 Re: SQL Order Question