Re: Bug? Concurrent COMMENT ON and DROP object

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

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-07-07 02:31:40 Re: Bug? Concurrent COMMENT ON and DROP object
Previous Message Robert Haas 2010-07-07 00:16:57 Re: Bug? Concurrent COMMENT ON and DROP object