Re: table locking

From: Shane Wright <me(at)shanewright(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: table locking
Date: 2002-02-18 15:46:16
Message-ID: 200202181546.g1IFk4l28406@fullerruss.dsvr.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Tom,

Thanks for the input, but I specifically can't use SELECT.. FOR UPDATE as the
SELECT won't match any rows (it isnt supposed to, there's an explanation as
to in a post I've just sent).

I had thought about ACCESS EXCLUSIVE MODE; but it looks like it'll block all
other readers as well, which isn't necessary.

Thanks

--
Shane

On Monday 18 Feb 2002 3:42 pm, Tom Lane wrote:
> I think you want just LOCK TABLE tab IN SHARE ROW EXCLUSIVE MODE
> or LOCK TABLE tab IN EXCLUSIVE MODE. The latter would lock out
> SELECT FOR UPDATE, the former wouldn't.
>
> regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Shane Wright 2002-02-18 16:37:38 Re: table locking
Previous Message Tom Lane 2002-02-18 15:42:56 Re: table locking