Andres Freund wrote:
> On 2015-08-03 14:15:27 +0900, Michael Paquier wrote:
> > As long as this only applies on master, this may be fine... We could
> > basically pass a LOCKMASK to the multiple layers of tablecmds.c
> > instead of LOCKMODE to track all the locks that need to be taken, and
> > all the relations open during operations.
>
> This sounds far too complicated to me. Just LockRelationOid() the
> relation with the appropriate level everytime you pass through the
> function?
That opens up for lock escalation and deadlocks, doesn't it? You are
probably thinking that it's okay to ignore those but I don't necessarily
agree with that.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services