Re: Faster inserts with mostly-monotonically increasing values

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Faster inserts with mostly-monotonically increasing values
Дата
Msg-id CANP8+jJg6DdNY41K-1Q9KE9Fxpc5CjzdLbJi0z8F1wOZoOwx+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Faster inserts with mostly-monotonically increasing values  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Faster inserts with mostly-monotonically increasing values  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Список pgsql-hackers
On 14 March 2018 at 04:36, Pavan Deolasee <pavan.deolasee@gmail.com> wrote:
> I wonder if the shortened code path actually leads to
> heavier contention for EXCLUSIVE lock on the rightmost page, which in turn
> causes the slowdown. But that's just a theory. Any ideas how to prove or
> disprove that theory or any other pointers?

Certainly: dropping performance with higher sessions means increased
contention is responsible. Your guess is likely correct.

Suggest making the patch attempt a ConditionalLock on the target
block, so if its contended we try from top of index. So basically only
attempt the optimization if uncontended. This makes sense because in
many cases if the block is locked it is filling up and the RHS block
is more likely to change anyway.

-- 
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Comment fixes in create_grouping_paths() add_paths_to_append_rel()
Следующее
От: David Rowley
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning