From: Shane Wright <me@shanewright.co.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: table locking
Date: Mon, 18 Feb 2002 15:46:16 +0000
Message-ID: <200202181546.g1IFk4l28406@fullerruss.dsvr.co.uk> (raw)
In-Reply-To: <11225.1014046976@sss.pgh.pa.us>
References: <200202181516.g1IFGF517803@candle.pha.pa.us>
<200202181521.g1IFLwk24097@fullerruss.dsvr.co.uk>
<11225.1014046976@sss.pgh.pa.us>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: me@shanewright.co.uk, tgl@sss.pgh.pa.us
Subject: Re: table locking
In-Reply-To: <200202181546.g1IFk4l28406@fullerruss.dsvr.co.uk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox