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

From Michael Paesold
Subject Re: FOR SHARE vs FOR UPDATE locks
Date
Msg-id 456FD6D9.9020102@gmx.at
Whole thread Raw
In response to FOR SHARE vs FOR UPDATE locks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: FOR SHARE vs FOR UPDATE locks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:> I'm tempted to just error out in this scenario rather than allow the> lock upgrade.  Thoughts?

Although this seems to be a technically hard problem, the above sentence 
does not sound like the PostgreSQL way to solve problems (rather like 
MySQL). ;-)

Now seriously, isn't this a perfectly feasible scenario? E.g. the outer 
transaction acquires a shared lock because of foreign key constraints, and 
the sub transaction later wants to update that row?

Best Regards
Michael Paesold


pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: [GENERAL] Allowing SYSDATE to Work
Next
From: Tom Lane
Date:
Subject: Re: FOR SHARE vs FOR UPDATE locks