Re: Bug? Concurrent COMMENT ON and DROP object - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bug? Concurrent COMMENT ON and DROP object
Date
Msg-id 22639.1278469135@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bug? Concurrent COMMENT ON and DROP object  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Bug? Concurrent COMMENT ON and DROP object
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Obviously not.  We don't need to acquire an AccessExclusiveLock to
> comment on an object - just something that will CONFLICT WITH an
> AccessExclusiveLock.  So, use the same locking rules, perhaps, but
> take a much weaker lock, like AccessShareLock.

Well, it probably needs to be a self-conflicting lock type, so that
two COMMENTs on the same object can't run concurrently.  But I agree
AccessExclusiveLock is too strong: that implies locking out read-only
examination of the object, which we don't want.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Bug? Concurrent COMMENT ON and DROP object
Next
From: Robert Haas
Date:
Subject: Re: Bug? Concurrent COMMENT ON and DROP object