On Thu, Nov 20, 2014 at 12:19 PM, Andres Freund <and...@2ndquadrant.com> wrote: > Except that it opens us up for all kinds of concurrency bugs. I'm pretty > strictly set against granting any self exclusive locks en-masse. If we > do this by default for all granted locks when starting a worker backend > it'll get *so* much harder to reason about correctness. Suddenly locks > don't guarantee what they used to anymore. We'll e.g. not be able to > rely that a CheckTableNotInUse() + AEL makes it safe to > drop/rewrite/whatever a relation - even if that happens in the main > backend.
Haven't I responded to this a few times already? I see no way, even theoretically, that it can be sane for CheckTableNotInUse() to succeed in a parallel context. Ever. If the deadlock detector would kill the processes anyway, it doesn't matter, because CheckTableNotInUse() should do it first, so that we get a better error and without waiting for deadlock_timeout. So any scenario that's predicated on the assumption that CheckTableNotInUse() will succeed in a parallel context is 100% unconvincing to me as an argument for anything. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers