| От | Tom Lane |
|---|---|
| Тема | Re: AW: Issue NOTICE for attempt to raise lock level? |
| Дата | |
| Msg-id | 6358.973616757@sss.pgh.pa.us обсуждение |
| Ответ на | AW: Issue NOTICE for attempt to raise lock level? (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>) |
| Список | pgsql-hackers |
Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at> writes:
>> I am working on eliminating the "relation NNN modified while in use"
>> misfeature by instead grabbing a lock on each relation at first use
>> in a statement, and holding that lock till end of transaction.
> As anticipated, I object :-)
Your objection is founded on two misunderstandings. In the first place,
we are *always* inside a transaction when executing a query. It may be
an implicit one-statement transaction, but it's still a transaction.
In the second place, we already grab locks that we do not release till
end of xact for all user-level queries. The problem is that we grab
them too late, ie, in the executor. I'm just planning to move up the
grab till first use.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера