Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b7pn8-00071a-H5 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2016 19:57:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b7pn8-0006Gk-3c for pgsql-hackers@arkaria.postgresql.org; Tue, 31 May 2016 19:57:30 +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 1b7pll-0003lA-PZ for pgsql-hackers@postgresql.org; Tue, 31 May 2016 19:56:05 +0000 Received: from smtp-auth.no-ip.com ([8.23.224.61] helo=out.smtp-auth.no-ip.com) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b7pli-00086N-F0 for pgsql-hackers@postgresql.org; Tue, 31 May 2016 19:56:04 +0000 X-No-IP: alvh.no-ip.org@noip-smtp X-Report-Spam-To: abuse@no-ip.com Received: from alvin.alvh.no-ip.org (unknown [216.155.90.98]) (Authenticated sender: alvh.no-ip.org@noip-smtp) by smtp-auth.no-ip.com (Postfix) with ESMTPA id 2681240095F; Tue, 31 May 2016 12:55:56 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 91CC8699; Tue, 31 May 2016 15:55:53 -0400 (CLT) Date: Tue, 31 May 2016 15:55:53 -0400 From: Alvaro Herrera To: Robert Haas Cc: Tom Lane , Josh berkus , Peter Eisentraut , Peter Geoghegan , Noah Misch , David Rowley , Amit Kapila , Magnus Hagander , Bruce Momjian , PostgreSQL-development Subject: Re: Rename max_parallel_degree? Message-ID: <20160531195553.GA895326@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Pg-Spam-Score: -1.1 (-) 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 Robert Haas wrote: > Also, I think that we might actually want to add an > additional GUC to prevent the parallel query system from consuming the > entire pool of processes established by max_worker_processes. If > you're doing anything else with worker processes on your system, you > might well want to say, well, it's OK to have up to 20 worker > processes, but at most 10 of those can be used for parallel queries, > so that the other 10 are guaranteed to be available for whatever other > stuff I'm running that uses the background process facility. It's > worth remembering that the background worker stuff was originally > invented by Alvaro to allow users to run daemons, not for parallel > query. Agreed -- things like pglogical and BDR rely on background workers to do their jobs. Many other users of bgworkers have popped up, so I think it'd be a bad idea if parallel queries are able to monopolize all the available slots. > So I think in the long run we should have three limits: > > 1. Cluster-wide limit on number of worker processes for all purposes > (currently, max_worker_processes). > > 2. Cluster-wide limit on number of worker processes for parallelism > (don't have this yet). > > 3. Per-operation limit on number of worker processes for parallelism > (currently, max_parallel_degree). > > Whatever we rename, there needs to be enough semantic space between #1 > and #3 to allow for the possibility - I think the very likely > possibility - that we will eventually also want #2. max_background_workers sounds fine to me for #1, and I propose to add #2 in 9.6 rather than wait. max_total_parallel_query_workers ? I already presented my proposal for #3 which, as you noted, nobody endorsed. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers