Re: refresh materialized view concurrently

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [9.4 CF 1] The Commitfest Slacker List
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [9.4 CF 1] The Commitfest Slacker List