Re: Bug? Concurrent COMMENT ON and DROP object

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug? Concurrent COMMENT ON and DROP object
Date: 2010-07-07 22:50:07
Message-ID: AANLkTikaWmwtZRdlVp0XrDSLiQX34-lGYNB7aWcNMMz-@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jul 6, 2010 at 10:59 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Robert Haas's message of mar jul 06 22:31:40 -0400 2010:
>> On Tue, Jul 6, 2010 at 10:18 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > Robert Haas <robertmhaas(at)gmail(dot)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?
>
> So COMMENT ON will conflict with (auto)vacuum?  Seems a bit weird ...

Well, I'm open to suggestions... I doubt we want to create a new lock
level just for this.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-07 22:55:05 Re: Proposal for 9.1: WAL streaming from WAL buffers
Previous Message Josh Berkus 2010-07-07 22:48:23 Re: Re: [COMMITTERS] pgsql: Fix log_temp_files docs and comments to say bytes not kilobytes.