Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jesper Krogh <jesper(at)krogh(dot)cc>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PENDING_LIST_CLEANUP_SIZE - maximum size of GIN pending list Re: HEAD seems to generate larger WAL regarding GIN index
Date: 2014-09-10 09:55:13
Message-ID: CAHGQGwENXY2YWQJz3=omkYdDJHGk0LrtCMxZnfdjiP8pzKFnMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 10, 2014 at 5:35 PM, Etsuro Fujita
<fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> (2014/09/10 12:31), Fujii Masao wrote:
>>
>> On Wed, Sep 10, 2014 at 12:15 PM, Etsuro Fujita
>> <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
>>>
>>> (2014/09/09 22:17), Fujii Masao wrote:
>>>>
>>>> Attached is the updated version of the patch.
>
>
>>> I took a quick review on the patch. It looks good to me,
>
>
>>> but one thing I'm
>>> concerned about is
>>>
>>> You wrote:
>>>>>>>
>>>>>>> The attached patch introduces the GIN index storage parameter
>>>>>>> "PENDING_LIST_CLEANUP_SIZE" which specifies the maximum size of
>>>>>>> GIN pending list. If it's not set, work_mem is used as that maximum
>>>>>>> size,
>>>>>>> instead. So this patch doesn't break the existing application which
>>>>>>> currently uses work_mem as the threshold of cleanup operation of
>>>>>>> the pending list. It has only not to set PENDING_LIST_CLEANUP_SIZE.
>>>
>>>
>>> As you mentioned, I think it's important to consider for the existing
>>> applications, but I'm wondering if it would be a bit confusing users to
>>> have
>>> two parameters,
>>
>>
>> Yep.
>>
>>> PENDING_LIST_CLEANUP_SIZE and work_mem, for this setting.
>>> Wouldn't it be easy-to-use to have only one parameter,
>>> PENDING_LIST_CLEANUP_SIZE? How about setting PENDING_LIST_CLEANUP_SIZE
>>> to
>>> work_mem as the default value when running the CREATE INDEX command?
>>
>>
>> That's an idea. But there might be some users who want to change
>> the cleanup size per session like they can do by setting work_mem,
>> and your idea would prevent them from doing that...
>
>
> Why not use ALTER INDEX ... SET (PENDING_LIST_CLEANUP_SIZE= ...)? Maybe I'm
> missing something, though.

It takes AccessExclusive lock and has an effect on every sessions
(not only specified session).

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Etsuro Fujita 2014-09-10 10:05:25 Re: LIMIT for UPDATE and DELETE
Previous Message Marko Tiikkaja 2014-09-10 09:33:29 Re: LIMIT for UPDATE and DELETE