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

From Robert Haas
Subject Re: Bug? Concurrent COMMENT ON and DROP object
Date
Msg-id AANLkTilqwBhZakYW1jUfFCZsZXTuneHc8HzZFyf3WBxb@mail.gmail.com
Whole thread Raw
In response to Re: Bug? Concurrent COMMENT ON and DROP object  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Bug? Concurrent COMMENT ON and DROP object
Re: Bug? Concurrent COMMENT ON and DROP object
List pgsql-hackers
On Tue, Jul 6, 2010 at 10:18 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Hmm... so, maybe ShareUpdateExclusiveLock?  That looks to be the
weakest thing that is self-conflicting.  The others are
ShareRowExclusiveLock, ExclusiveLock, and AccessExclusiveLock.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug? Concurrent COMMENT ON and DROP object
Next
From: Alvaro Herrera
Date:
Subject: Re: Bug? Concurrent COMMENT ON and DROP object