Received: from sectorbase2.sectorbase.com ([208.48.122.131]) by hub.org (8.10.1/8.10.1) with ESMTP id e682ATW28799 for ; Fri, 7 Jul 2000 22:10:30 -0400 (EDT) Received: by SECTORBASE2 with Internet Mail Service (5.5.2650.21) id <3K768LBB>; Fri, 7 Jul 2000 19:01:12 -0700 Message-ID: <8F4C99C66D04D4118F580090272A7A23018C4A@SECTORBASE1> From: "Mikheev, Vadim" To: "'Forest Wilkinson'" , pgsql-sql@hub.org Subject: RE: How to get a self-conflicting row level lock? Date: Fri, 7 Jul 2000 19:03:10 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" X-Archive-Number: 200007/101 > 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