Re: issue with gininsert under very high load

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: issue with gininsert under very high load
Дата
Msg-id 52FCFCF6.2030900@dunslane.net
обсуждение исходный текст
Ответ на Re: issue with gininsert under very high load  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
On 02/13/2014 10:58 AM, Heikki Linnakangas wrote:

>>> Perhaps we should use a lock to enforce that only one process tries to
>>> clean up the pending list at a time.
>>
>> Is that going to serialize all these inserts?
>
> It will serialize the cleanup process, which moves entries from the 
> pending list to the tree proper. But that's better than the current 
> situation. Currently, when two processes attempt it, they will both 
> try to insert into the GIN tree, but one of them will notice that the 
> other one already did the cleanup, and bail out. So only one process 
> contributes to progress, while the others just waste their effort.
>
> The processes should try to get the lock, and just give up if it's 
> already held rather than wait. If someone else is already doing the 
> cleanup, there's no need for the current process to do it.
>


Sounds good.

cheers

andrew




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

Предыдущее
От: Vik Fearing
Дата:
Сообщение: nextVictimBuffer in README
Следующее
От: Andres Freund
Дата:
Сообщение: Re: truncating pg_multixact/members