From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Jeff Davis <pgsql(at)j-davis(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: group locking: incomplete patch, just for discussion |
Date: | 2014-11-20 18:57:25 |
Message-ID: | CA+TgmoYcDDRZdCLy_j1oJOTNDjkU2y8j9mOpgWtK3hgxFV6MCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 20, 2014 at 12:19 PM, Andres Freund <andres(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-11-20 19:03:49 | Re: Doing better at HINTing an appropriate column within errorMissingColumn() |
Previous Message | Albe Laurenz | 2014-11-20 18:56:58 | Re: Functions used in index definitions shouldn't be changed |