Re: Partial index locks
От
Thom Brown
Тема
Re: Partial index locks
Дата
Msg-id
CAA-aLv6OLOxYo4V2FFjOtMecGopFcKJam2Jh-Jy+kphRU9DQJg@mail.gmail.com
Ответ на
Re: Partial index locks (Tom Lane)
Список
Дерево обсуждения
Partial index locks Thom Brown <thom@linux.com>
Re: Partial index locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Partial index locks Thom Brown <thom@linux.com>
Re: Partial index locks Tom Lane <tgl@sss.pgh.pa.us>
Re: Partial index locks Thom Brown <thom@linux.com>
Re: Partial index locks Vik Fearing <vik.fearing@dalibo.com>
Re: Partial index locks Jim Nasby <jim@nasby.net>
Re: Partial index locks Thom Brown <thom@linux.com>
Re: Partial index locks Thom Brown <thom@linux.com>
On 22 March 2014 05:32, Tom Lane wrote: > Thom Brown writes: >> Is it necessary for a partial index that doesn't include the row to be >> involved in locking? > > 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 only possible alternative would be to take the minimum possible > lock (AccessShareLock) on each index so its metadata would hold still, > and then upgrade that to RowExclusiveLock on the one(s) we find need > insertions. This is not better; it means *more* lock management traffic > not less, and lock upgrades increase the potential for deadlocks. Yes, I can see that wouldn't be an improvement. -- Thom
В списке pgsql-hackers по дате отправления
От: Martijn van Oosterhout
Дата: