Re: FOR SHARE vs FOR UPDATE locks - Mailing list pgsql-hackers

From Tom Lane
Subject Re: FOR SHARE vs FOR UPDATE locks
Date
Msg-id 534.1164994846@sss.pgh.pa.us
Whole thread Raw
In response to Re: FOR SHARE vs FOR UPDATE locks  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: FOR SHARE vs FOR UPDATE locks  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-hackers
Actually ... wait a minute.  The proposed hack covers the case of
SELECT FOR SHARE followed by SELECT FOR UPDATE within a subtransaction.
But what about SELECT FOR SHARE followed by an actual UPDATE (or DELETE)?

We certainly don't want to mark the UPDATE/DELETE as having been carried
out by the upper transaction, but there's no way we can record the
UPDATE while still remembering the previous share-lock.

So I think I'm back to the position that we should throw an error here.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: 8.2 Beta3-> RC1 upgrade
Next
From: "Heikki Linnakangas"
Date:
Subject: Re: FOR SHARE vs FOR UPDATE locks