agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Arthur Zakirov <a.zakirov@postgrespro.ru>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Ildus Kurbangaliev <i.kurbangaliev@postgrespro.ru>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PROPOSAL] Shared Ispell dictionaries
Date: Tue, 20 Mar 2018 21:30:15 +0100
Message-ID: <ebcb7f9d-eec2-3138-efde-af83b6a0f04f@2ndquadrant.com> (raw)
In-Reply-To: <20180320131149.GA12884@zakirov.localdomain>
References: <CAFj8pRDZOMQOmMhX4KSn+KTXbdB24ZaJxTxnYCHms_ya2Z2cOQ@mail.gmail.com>
	<20180307125847.GA12617@zakirov.localdomain>
	<CAFj8pRB=FWzq=FfoSPeoJfXG4a7P0Abp+0XKmet3E34tiuTUFA@mail.gmail.com>
	<CAFj8pRDm9nhZCf16XDer-eeciqy0wipR0Y4+ZdwGMAWuv-k6ag@mail.gmail.com>
	<20180307131819.GA13301@zakirov.localdomain>
	<3c7910ba-2a1b-5b73-71c6-d037ba1e89bd@2ndquadrant.com>
	<CAKNkYnzWuSV-JoMBPDrWPjomUC4n1QtYd8Yugo9hpJrbtHcALg@mail.gmail.com>
	<d4d52484-e269-9d7b-cef5-c1e95a03d9c6@2ndquadrant.com>
	<20180319110648.GA32319@zakirov.localdomain>
	<2ae9588a-f3cb-777d-1958-c76c22225823@2ndquadrant.com>
	<20180320131149.GA12884@zakirov.localdomain>



On 03/20/2018 02:11 PM, Arthur Zakirov wrote:
> Hello,
> 
> On Mon, Mar 19, 2018 at 08:50:46PM +0100, Tomas Vondra wrote:
>> Hi Arthur,
>>
>> I went through the patch - just skimming through the diffs, will do more
>> testing tomorrow. Here are a few initial comments.
> 
> Thank you for the review!
> 
>> 1) max_shared_dictionaries_size / PGC_POSTMASTER
>>
>> I'm not quite sure why the GUC is defined as PGC_POSTMASTER, i.e. why it
>> can't be changed after server start. That seems like a fairly useful
>> thing to do (e.g. increase the limit while the server is running), and
>> after looking at the code I think it shouldn't be difficult to change.
> 
> max_shared_dictionaries_size is defined as PGC_SIGHUP now. Added check
> of a new value to disallow to set zero if there are loaded dictionaries
> and to decrease maximum allowed size if loaded size is greater than the
> new value.
> 

I wonder if these restrictions needed? I mean, why not to allow setting
max_shared_dictionaries_size below the size of loaded dictionaries?

Of course, on the one hand those restriction seem sensible. On the other
hand, perhaps in some cases it would be useful to allow violating them?

I mean, why not to simply disable loading of new dictionaries when

    (max_shared_dictionaries_size < loaded_size)

Maybe I'm over-thinking this though. It's probably safer and less
surprising to enforce the restrictions.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (108+ messages)  latest in thread

Message-ID: <ebcb7f9d-eec2-3138-efde-af83b6a0f04f@2ndquadrant.com>
Permalink:  ../ebcb7f9d-eec2-3138-efde-af83b6a0f04f@2ndquadrant.com/
Also on:    postgresql.org/message-id/ebcb7f9d-eec2-3138-efde-af83b6a0f04f@2ndquadrant.com

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tomas.vondra@2ndquadrant.com, a.zakirov@postgrespro.ru, pavel.stehule@gmail.com, andres@anarazel.de, i.kurbangaliev@postgrespro.ru
  Subject: Re: [PROPOSAL] Shared Ispell dictionaries
  In-Reply-To: <ebcb7f9d-eec2-3138-efde-af83b6a0f04f@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox