From: | Jaime Casanova <jaime(dot)casanova(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: GIN pending list clean up exposure to SQL |
Date: | 2015-11-19 16:57:18 |
Message-ID: | CAJGNTePNas1zQMeowKwQg1-rhMc2AH+gYQ0dtiLYN1O4zTKoyg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 19 November 2015 at 14:47, Jaime Casanova
<jaime(dot)casanova(at)2ndquadrant(dot)com> wrote:
> On 19 November 2015 at 14:18, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>> Alvaro Herrera wrote:
>>> Jeff Janes wrote:
>>> > I've written a function which allows users to clean up the pending list.
>>> > It takes the index name and returns the number of pending list pages
>>> > deleted.
>>>
>>> I just noticed that your patch uses AccessShareLock on the index. Is
>>> that okay? I would have assumed that you'd need ShareUpdateExclusive
>>> (same as vacuum uses), but I don't really know. Was that a carefully
>>> thought-out choice?
>>
>> After reading gitPendingCleanup it becomes clear that there's no need
>> for a stronger lock than what you've chosen. Jaime Casanova just
>> pointed this out to me.
>>
>
> But it should do some checks, no?
> - only superusers?
> - what i received as parameter is a GIN index?
>
I just notice this:
+ ginInsertCleanup(&ginstate, true, &stats);
ginInsertCleanup() now has four parameters, so you should update the call
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2015-11-19 16:58:40 | Re: pgbench unusable after crash during pgbench |
Previous Message | Marko Tiikkaja | 2015-11-19 16:47:55 | Re: proposal: LISTEN * |