From: Mikheev, Vadim <vmikheev@SECTORBASE.COM>
To: 'Forest Wilkinson' <fspam@home.com>
To: pgsql-sql@hub.org
Subject: RE: How to get a self-conflicting row level lock?
Date: Fri, 7 Jul 2000 19:03:10 -0700
Message-ID: <8F4C99C66D04D4118F580090272A7A23018C4A@SECTORBASE1> (raw)
> Is it true that SELECT ... FOR UPDATE only acquires a ROW
> SHARE MODE lock, and that it isn't self-conflicting?
SELECT FOR UPDATE acquires ROW SHARE LOCK on *table* level.
But rows returned by SELECT FOR UPDATE is locked *exclusively*
- so any other transaction which tries to mark the same row
for update (or delete/update it) will be blocked... and will
return *updated* row version after 1st transaction committed.
Vadim
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: vmikheev@SECTORBASE.COM, fspam@home.com, pgsql-sql@hub.org
Subject: Re: How to get a self-conflicting row level lock?
In-Reply-To: <8F4C99C66D04D4118F580090272A7A23018C4A@SECTORBASE1>
References: <8F4C99C66D04D4118F580090272A7A23018C4A@SECTORBASE1>
* 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