Re: Question about tuple´s lock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question about tuple´s lock
Дата
Msg-id 849349.1698179507@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question about tuple´s lock  (Carlos Alves <carlos.alves@tecnisys.com.br>)
Ответы Re: Question about tuple´s lock
Список pgsql-general
Carlos Alves <carlos.alves@tecnisys.com.br> writes:
> I need some help to understand why a transaction wiht a row delete
> aquire a AccessExclusiveLock and a row update a ExclusiveLock. 

UPDATE can use the weaker lock type if it's not modifying any
column that is part of a unique index.  This is to allow concurrency
with foreign-key checks that might wish to grab a read-only (shared)
lock on such a tuple.

A DELETE, or an UPDATE that is modifying key columns, has to
conflict with foreign-key checks.

            regards, tom lane



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

Предыдущее
От: Ron
Дата:
Сообщение: Re: setting up streaming replication
Следующее
От: Carlos Alves
Дата:
Сообщение: Re: Question about tuple´s lock