Tom Lane wrote:
> Decibel! <[EMAIL PROTECTED]> writes:
> > Would it be worthwhile to allow for logging when a lock gets upgraded?
> > That would make it easier to protect against deadlocks...
>
> There is some debug code for that in the backend, but my experience
> is that it's too noisy to have o
Decibel! <[EMAIL PROTECTED]> writes:
> Would it be worthwhile to allow for logging when a lock gets upgraded?
> That would make it easier to protect against deadlocks...
There is some debug code for that in the backend, but my experience
is that it's too noisy to have on by default.
On Mon, Jan 21, 2008 at 04:54:06PM -0500, Tom Lane wrote:
> It's probably not a good idea to have shdepReassignOwned() take only
> AccessShareLock on pg_shdepend. Even though the function itself
> merely reads the table, it is going to call functions that will take
> RowExclusiveLock, meaning that
Alvaro Herrera wrote:
> Hmm, unless revoking privileges concurrently, for two different users on
> the same object could cause a problem? I don't see us grabbing a lock
> on the object itself -- does this matter?
I tried a simple test: a process in a loop calling GRANT and REVOKE on random
users
Tom Lane wrote:
> Well, if there is any such problem then it could be triggered by two
> independent plain-ol-REVOKE commands, so I still don't see an argument
> why shdepDropOwned is more at risk than anything else. I think we
> should just downgrade the lock.
Both issues fixed, thanks.
--
Al
Alvaro Herrera <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Why does shdepDropOwned() take AccessExclusiveLock on pg_shdepend?
> Hmm, I can't recall nor deduce any reason for that. Perhaps the
> intention was to protect against itself; but I think this should only
> matter if we're dropping t
Tom Lane wrote:
> I came across some rather strange choices of lock levels in pg_shdepend.c.
>
> Why does shdepDropOwned() take AccessExclusiveLock on pg_shdepend?
> Seems like RowExclusiveLock should be sufficient. If it isn't
> sufficient, I wonder whether the other functions in here are taking
I came across some rather strange choices of lock levels in pg_shdepend.c.
Why does shdepDropOwned() take AccessExclusiveLock on pg_shdepend?
Seems like RowExclusiveLock should be sufficient. If it isn't
sufficient, I wonder whether the other functions in here are taking
strong enough locks.
It'