Re: relation ### modified while in use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: relation ### modified while in use
Дата
Msg-id 8435.972312333@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: relation ### modified while in use  (Philip Warner <pjw@rhyme.com.au>)
Ответы Re: relation ### modified while in use  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> Don't we have this ability? What about taking a RowShare lock on the
> pg_class tuple whenever you read from the table; then requiring schema
> updates take a RowExclusive lock on the pg_class tuple?

How is that different from taking locks on the table itself?

In any case, we don't have the ability to hold multiple classes of locks
on individual tuples, AFAIK.  UPDATE and SELECT FOR UPDATE use a
different mechanism that involves setting fields in the header of the
affected tuple.  There's no room there for more than one kind of lock;
what's worse, checking and waiting for that lock is far slower than
normal lock-manager operations.  (But on the plus side, you can be
holding locks on any number of tuples without risking overflowing the
lock manager table, and releasing the locks at commit takes no cycles.)
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: testing my connection to list.
Следующее
От: Philip Warner
Дата:
Сообщение: Re: relation ### modified while in use