Re: Locking for Rename To new_name works differently for different objects

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Locking for Rename To new_name works differently for different objects
Дата
Msg-id CA+TgmoZZe=nND7X0k9GiSJwsBvhUQBFBoVu=-yHq94t7qkPq4Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Locking for Rename To new_name works differently for different objects  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Locking for Rename To new_name works differently for different objects
Список pgsql-hackers
On Wed, Oct 15, 2014 at 10:04 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Amit Kapila <amit.kapila16@gmail.com> writes:
>> I have observed that for renaming some of the objects
>> AccessExclusiveLock is taken on object whereas for
>> other kind of objects no lock is taken on object before
>> renaming the object.
>
> The usual theory for DDL updates of all types (not just rename)
> is that an explicit lock is only needed for objects whose catalog
> representation comprises more than one row.  Otherwise, the implicit
> locking involved in updating that row is sufficient to serialize
> different updates.

That's an interesting point that I hadn't considered, but I'm willing
to believe that at least some of the differences might also be
haphazard.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: group locking: incomplete patch, just for discussion
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Maximum number of WAL files in the pg_xlog directory