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

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, 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-11-04 03:04:54
Message-ID: 54584256.4030407@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

(2014/10/30 21:30), Fujii Masao wrote:
> On Thu, Oct 30, 2014 at 7:30 PM, Etsuro Fujita
> <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp> wrote:

>> Here are my review comments.
>>
>> * The patch applies cleanly and make and make check run successfully. I
>> think that the patch is mostly good.
>
> Thanks! Attached is the updated version of the patch.

Thank you for updating the patch!

>> * In src/backend/utils/misc/guc.c:
>> + {
>> + {"pending_list_cleanup_size", PGC_USERSET,
>> CLIENT_CONN_STATEMENT,
>> + gettext_noop("Sets the maximum size of the pending
>> list for GIN index."),
>> + NULL,
>> + GUC_UNIT_KB
>> + },
>> + &pending_list_cleanup_size,
>> + 4096, 0, MAX_KILOBYTES,
>> + NULL, NULL, NULL
>> + },
>>
>> ISTM it'd be better to use RESOURCES_MEM, not CLIENT_CONN_STATEMENT. No?
>
> Yes if the pending list always exists in the memory. But not, IIUC. Thought?

Exactly. But I think we can expect that in many cases, since I think
that the users would often set the GUC to a small value to the extent
that most of the pending list pages would be cached by shared buffer, to
maintain *search* performance.

I'd like to hear the opinions of others about the category for the GUC.

>> Also why not set min to 64, not to 0, in accoradance with that of work_mem?
>
> I'm OK to use 64. But I just chose 0 because I could not think of any reasonable
> reason why 64k is suitable as the minimum size of the pending list.
> IOW, I have no idea about whether it's reasonable to use the min value of
> work_mem as the min size of the pending list.

IIUC, I think that min = 0 disables fast update, so ISTM that it'd be
appropriate to set min to some positive value. And ISTM that the idea
of using the min value of work_mem is not so bad.

>> * In doc/src/sgml/ref/create_index.sgml:
>> + <term><literal>PENDING_LIST_CLEANUP_SIZE</></term>
>>
>> IMHO, it seems to me better for this variable to be in lowercase in
>> accordance with the GUC version.
>
> Using lowercase only for pending_list_cleanup_size and uppercase for
> other options
> looks strange to me. What about using lowercase for all the storage options?

+1

> I changed the document in that way.

*** 356,361 **** CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ <replaceable
class="parameter">name</
--- 356,372 ----
</listitem>
</varlistentry>
</variablelist>
+ <variablelist>
+ <varlistentry>
+ <term><literal>PENDING_LIST_CLEANUP_SIZE</></term>

The above is still in uppercse.

Thanks,

Best regards,
Etsuro Fujita

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-11-04 03:08:04 Re: BUG #11867: Strange behaviour with composite types after resetting database tablespace
Previous Message Michael Paquier 2014-11-04 02:44:22 Re: Let's drop two obsolete features which are bear-traps for novices