Re: GIN pending list clean up exposure to SQL - Mailing list pgsql-hackers

From Jaime Casanova
Subject Re: GIN pending list clean up exposure to SQL
Date
Msg-id CAJGNTePqJR7=UDg07sOTTeXNTQ7Lh247KXeV4ryXb_-GCYL55A@mail.gmail.com
Whole thread Raw
In response to Re: GIN pending list clean up exposure to SQL  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: GIN pending list clean up exposure to SQL
Re: GIN pending list clean up exposure to SQL
List pgsql-hackers
On 19 November 2015 at 14:18, Alvaro Herrera <alvherre@2ndquadrant.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?

--
Jaime Casanova                      www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación



pgsql-hackers by date:

Previous
From: Thom Brown
Date:
Subject: Re: pgbench unusable after crash during pgbench
Next
From: Marko Tiikkaja
Date:
Subject: Re: proposal: LISTEN *