Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bq0ca-0008Ln-NW for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 16:25:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bq0ca-0005UE-5c for pgsql-hackers@arkaria.postgresql.org; Fri, 30 Sep 2016 16:25:12 +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.84_2) (envelope-from ) id 1bq0bB-0002tO-IF for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 16:23:45 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bq0b7-0007z3-Nl for pgsql-hackers@postgresql.org; Fri, 30 Sep 2016 16:23:44 +0000 Received: from [192.168.0.6] (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mail.dalibo.com (Postfix) with ESMTPSA id D941B2C0822; Fri, 30 Sep 2016 18:23:39 +0200 (CEST) Subject: Re: Rename max_parallel_degree? To: Robert Haas , Peter Eisentraut References: <20160426152217.GA548975@alvherre.pgsql> <9f84548d-8b59-b5c8-510d-991f8ee3ab20@dalibo.com> <20312f33-c14e-0d3f-a79f-95212f64a38c@dalibo.com> <9a3ca4ad-c3ea-2c02-499a-029e053fedda@dalibo.com> <7ef3a740-8c64-764d-9f02-b27132d89602@2ndquadrant.com> Cc: Amit Kapila , Tom Lane , Josh Berkus , "David G. Johnston" , Peter Geoghegan , Noah Misch , David Rowley , Alvaro Herrera , Magnus Hagander , Bruce Momjian , PostgreSQL-development From: Julien Rouhaud Message-ID: <699e9156-fb30-7a6d-0f5f-b78b97ddce14@dalibo.com> Date: Fri, 30 Sep 2016 18:23:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 23/09/2016 21:10, Robert Haas wrote: > On Fri, Sep 23, 2016 at 8:54 AM, Peter Eisentraut > wrote: >> On 9/20/16 4:07 PM, Robert Haas wrote: >>> No, I'm assuming that the classes would be built-in. A string tag >>> seems like over-engineering to me, particularly because the postmaster >>> needs to switch on the tag, and we need to be very careful about the >>> degree to which the postmaster trusts the contents of shared memory. >> >> I'm hoping that we can come up with something that extensions can >> participate in, without the core having to know ahead of time what those >> extensions are or how they would be categorized. >> >> My vision is something like >> >> max_processes = 512 # requires restart >> >> process_allowances = 'connection:300 superuser:10 autovacuum:10 >> parallel:30 replication:10 someextension:20 someotherextension:20' >> # does not require restart > > I don't think it's going to be very practical to allow extensions to > participate in the mechanism because there have to be a finite number > of slots that is known at the time we create the main shared memory > segment. > > Also, it's really important that we don't add lots more surface area > for the postmaster to crash and burn. > It seems that there's no objection on Robert's initial proposal, so I'll try to implement it. I've already fixed every other issues mentioned upthread, but I'm facing a problem for this one. Assuming that the bgworker classes are supposed to be mutually exclusive, I don't see a simple and clean way to add such a check in SanityCheckBackgroundWorker(). Am I missing something obvious, or can someone give me some advice for this? -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers