| От | Tom Lane |
|---|---|
| Тема | Re: refresh materialized view concurrently |
| Дата | |
| Msg-id | 25398.1372881866@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: refresh materialized view concurrently (Kevin Grittner <kgrittn@ymail.com>) |
| Список | pgsql-hackers |
Kevin Grittner <kgrittn@ymail.com> writes:
> Further testing shows that any UPDATE or DELETE statement acquires
> a RowExclusiveLock on every index on the table and holds it until
> end of transaction, whether or not any rows are affected and
> regardless of whether an index scan or a seqscan is used.� In fact,
> just an EXPLAIN of an UPDATE or DELETE does so.� It is only INSERT
> which releases the locks at the end of the statement.
Hm, possibly the planner is taking those locks. I don't think the
executor's behavior is any different. But the planner only cares about
indexes in SELECT/UPDATE/DELETE, since an INSERT has no interest in
scanning the target table.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера