Re: Partial index locks

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partial index locks
Дата
Msg-id 18480.1395500642@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Partial index locks  (Thom Brown <thom@linux.com>)
Ответы Re: Partial index locks  (Thom Brown <thom@linux.com>)
Список pgsql-hackers
Thom Brown <thom@linux.com> writes:
> On 22 March 2014 05:32, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Yes.  You can't determine whether the index needs to get a new entry
>> without examining its metadata, and that's what the lock is mainly about.

> I see.  Why does this apply to deletes too?

The executor doesn't take locks on indexes for a delete.  I think the
planner probably does, though, since it wants to look at all the indexes
to see if any can be used to satisfy WHERE searches.

Possibly it would be worth hacking the planner to only take
AccessShareLock not RowExclusiveLock on target indexes in DELETE.
I can't get very excited about that though; in what circumstances
would it actually make a difference?
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Review: plpgsql.extra_warnings, plpgsql.extra_errors
Следующее
От: Thom Brown
Дата:
Сообщение: Re: Partial index locks