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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Locking for Rename To new_name works differently for different objects
Дата
Msg-id 4539.1413381892@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Locking for Rename To new_name works differently for different objects  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Locking for Rename To new_name works differently for different objects  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
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.
        regards, tom lane



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

Предыдущее
От: Kouhei Kaigai
Дата:
Сообщение: Re: How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: group locking: incomplete patch, just for discussion