Re: FOR SHARE vs FOR UPDATE locks
Michael Paesold <mpaesold@gmx.at>
From: Michael Paesold <mpaesold@gmx.at>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
pgsql-hackers@postgreSQL.org
Date: 2006-12-01T07:16:41Z
Lists: pgsql-hackers, pgsql-docs
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