Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bylU0-0007j0-7S for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Oct 2016 20:04:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bylTz-0001vW-9U for pgsql-hackers@arkaria.postgresql.org; Mon, 24 Oct 2016 20:04:31 +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 1bylTy-0001tB-6Q for pgsql-hackers@postgresql.org; Mon, 24 Oct 2016 20:04:30 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bylTv-0007Bz-3h for pgsql-hackers@postgresql.org; Mon, 24 Oct 2016 20:04:28 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0B6D2206E5; Mon, 24 Oct 2016 16:04:26 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 24 Oct 2016 16:04:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender; s=smtpout; bh=HmJ7NLQl1xiPD8Q+RPGCW5d6L ro=; b=HEhcrhm7x3T/0+KlSyOcnmaLAYERn20nNeF3/+6fV12S8pcEJ6FZG4KhL QGORPLjkkw0KvoZWx6aeWvrT1Hk2EQKf7t+S0OF6yeVMqyM9wDOtW3FjjE+tfQ3Q GZxEsyVvC6tTfwNPOzxu3rAhDKyuy4AHpligQkJtwNFBjgB9b4= X-ME-Sender: X-Sasl-enc: syp3Few4v2CPhSJz3g05S8DjiiEDJ8VXeRqGqTyVeRmf 1477339465 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 7CD4DF29D0; Mon, 24 Oct 2016 16:04:25 -0400 (EDT) Subject: Re: Rename max_parallel_degree? To: Robert Haas References: <20160426152217.GA548975@alvherre.pgsql> <9a3ca4ad-c3ea-2c02-499a-029e053fedda@dalibo.com> <7ef3a740-8c64-764d-9f02-b27132d89602@2ndquadrant.com> <699e9156-fb30-7a6d-0f5f-b78b97ddce14@dalibo.com> <243bd031-771f-d84c-72d7-96f62e97042d@2ndquadrant.com> Cc: Julien Rouhaud , Amit Kapila , Tom Lane , Josh Berkus , "David G. Johnston" , Peter Geoghegan , Noah Misch , David Rowley , Alvaro Herrera , Magnus Hagander , Bruce Momjian , PostgreSQL-development From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: Date: Mon, 24 Oct 2016 16:04:24 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.5 (--) 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 10/12/16 7:58 PM, Robert Haas wrote: > I don't think it's wrong that the handling is done there, though. The > process that is registering the background worker is well-placed to > check whether there are already too many, and if it does not then the > slot is consumed at least temporarily even if it busts the cap. On > the flip side, the postmaster is the only process that is well-placed > to know when a background worker terminates. The worker process > itself can't be made responsible for it, as you suggest below, because > it may never even start up in the first place (e.g. fork() returns > EAGAIN). And the registering process can't be made responsible, > because it might die before the worker. Those are valid technical points. I have not worked out any alternatives. I'm concerned that all this makes background workers managed by extensions second-class citizens. -- Peter Eisentraut 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