From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: issue with gininsert under very high load |
Date: | 2014-02-13 17:12:22 |
Message-ID: | 52FCFCF6.2030900@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-02-13 17:13:04 | Re: truncating pg_multixact/members |
Previous Message | Vik Fearing | 2014-02-13 17:10:18 | nextVictimBuffer in README |