Re: foreign key locks
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Erik Rijkers <er@xs4all.nl>
Cc: Kevin Grittner <kgrittn@mail.com>, pgsql-hackers@postgresql.org, Andres Freund <andres@2ndquadrant.com>
Date: 2013-01-10T21:00:40Z
Lists: pgsql-hackers
Attachments
- fklocks-28.patch.gz (application/octet-stream) patch
Here's version 28 of this patch. The only substantive change here from v26 is that I've made GetTupleForTrigger() use either LockTupleExclusive or LockTupleNoKeyExclusive, depending on whether the key columns are being modified by the update. This needs to go through EvalPlanQual, so that function is now getting the lock mode as a parameter instead of hardcoded LockTupleExclusive. (All other users of GetTupleForTrigger still use LockTupleExclusive, so there's no change for anybody other than FOR EACH ROW BEFORE UPDATE triggers). At this point, I think I've done all I wanted to do in connection with this patch, and I intend to commit. I think this is a good time to get it committed, so that people can play with it more extensively and report any breakage I might have caused before we even get into beta. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services