Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyNtq-0003Ix-3b for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Mar 2018 20:30:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eyNto-0001AF-W9 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Mar 2018 20:30:24 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyNto-0001A5-MH for pgsql-hackers@lists.postgresql.org; Tue, 20 Mar 2018 20:30:24 +0000 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eyNtl-0008Bg-Pk for pgsql-hackers@postgresql.org; Tue, 20 Mar 2018 20:30:23 +0000 Received: by mail-wr0-x22f.google.com with SMTP id s10so3042241wra.13 for ; Tue, 20 Mar 2018 13:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=808QmdLNnpfp0Z2E58ROnZiGFGhhztae0/lnX30uky8=; b=DYBjrFdstjg7AeK9oC/XBO7G4GcRA2lnsV1JZ/bdfMWzfpqu+CcweM7D/Z9Cndi3XA 3sYki2ZencQfJV/5HerXyKxMSZH9+Yljy8gB5L3NvUfWpUXkV53AHrH9MMWU/ZoaL3Wb AuIRmQmbzPjWc0tAqOcEYv7/CoDM77TTQMqoHnbafr2yEB2gfXDHDDcVPEKD7/ueqlgk l9xsa5eGeW9IY5IqDyNq+oNohfXVYMVF83006m5x14PntCJTCIKAbOnKY2dcLsOdphcf 68EY6LBSAtskxTvGiF35hVa7bvYZ/qq5UU5OS5FBUJ9LIPQrvvQUoYEcwl5/Shf2iiQ0 5P+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=808QmdLNnpfp0Z2E58ROnZiGFGhhztae0/lnX30uky8=; b=fwEB9wR1fDQYCGqj7xknrYesHjs3kzqrJNnqt1gYFFI9Y2Jy8AaTk/ZQfBsZW+3waj QxXtKmLfXNHFlo4alOcAS21Vy2UwdWxnWkz+6jiRrkYVFQrtPzqdof4e/bGNlLN6xCfO mUrcUwEyPRBCVk/YmfvSdvCAFNgPZKpJYYLNQDKl09qbjF8rqUdC9GBgcAtY+p6MA4Fz mi6ikRzMtLdq0d6uNPVxYWuRXAt0BogeMao3fTum/i/rX06PqxypREkQXKdU3e9XeAYK THJjdBJ+GqPu0SVjRUqKTlp2Og9WWLbvVgrFxKeWDOqA6RelXzZVp1fU9nYTdiGVWaYE ggfg== X-Gm-Message-State: AElRT7FdEU556/u0AFdihdqilaSCJi138goGnXw6UzOlbOpqq3zJ2u8R E74z+VdJLVylAadzR5MwEtlwJVuB2OfNaxLh4hizLpaUJJImZXclfKYQlvunUXFVy14uG+RHzt5 P5iNXa8GzRI0PH4aX4uk5jm7oAy+gbCs+74f6f06zRPSI/FOUkUmQDnxwQf469MsRS7xvweh2zU fM4Oqiecm5 X-Google-Smtp-Source: AG47ELsPEXeFXXjN72uRtS/7SuoCPos2JoFPotl1dX7FSFiZlxTnQfjJagOX4NQZ1b7a5AGxyde3dA== X-Received: by 10.223.161.77 with SMTP id r13mr14482821wrr.1.1521577819718; Tue, 20 Mar 2018 13:30:19 -0700 (PDT) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id e17sm534133wmf.1.2018.03.20.13.30.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Mar 2018 13:30:18 -0700 (PDT) Subject: Re: [PROPOSAL] Shared Ispell dictionaries To: Arthur Zakirov Cc: Pavel Stehule , Andres Freund , Ildus Kurbangaliev , pgsql-hackers References: <20180307125847.GA12617@zakirov.localdomain> <20180307131819.GA13301@zakirov.localdomain> <3c7910ba-2a1b-5b73-71c6-d037ba1e89bd@2ndquadrant.com> <20180319110648.GA32319@zakirov.localdomain> <2ae9588a-f3cb-777d-1958-c76c22225823@2ndquadrant.com> <20180320131149.GA12884@zakirov.localdomain> From: Tomas Vondra Message-ID: Date: Tue, 20 Mar 2018 21:30:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180320131149.GA12884@zakirov.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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