Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPcIG-0004PW-Gr for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jun 2017 22:15:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dPcIF-0007yB-Rx for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jun 2017 22:15:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dPcGh-0005Ar-IX for pgsql-hackers@postgresql.org; Mon, 26 Jun 2017 22:14:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dPcGe-0008Nu-Jm for pgsql-hackers@postgresql.org; Mon, 26 Jun 2017 22:14:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5QMDu0e017328; Mon, 26 Jun 2017 18:13:56 -0400 From: Tom Lane To: Andres Freund cc: Jeff Janes , Michael Paquier , PostgreSQL mailing lists Subject: Re: Reducing pg_ctl's reaction time In-reply-to: <20170626215018.2fudv2aha5rkkg4r@alap3.anarazel.de> References: <18520.1498508356@sss.pgh.pa.us> <20170626202356.qybnpn5li2ke4ioc@alap3.anarazel.de> <18890.1498508760@sss.pgh.pa.us> <20170626203347.6efkdwiadyt33edy@alap3.anarazel.de> <19812.1498510147@sss.pgh.pa.us> <20170626205853.ezhnmxpotdy3wokm@alap3.anarazel.de> <15166.1498512630@sss.pgh.pa.us> <20170626213414.ejcesidei2hv4h5x@alap3.anarazel.de> <15732.1498513083@sss.pgh.pa.us> <20170626215018.2fudv2aha5rkkg4r@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Mon, 26 Jun 2017 14:50:18 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <17326.1498515236.1@sss.pgh.pa.us> Date: Mon, 26 Jun 2017 18:13:56 -0400 Message-ID: <17327.1498515236@sss.pgh.pa.us> 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 Andres Freund writes: > On 2017-06-26 17:38:03 -0400, Tom Lane wrote: >> Hm. Take that a bit further, and we could drop the connection probes >> altogether --- just put the whole responsibility on the postmaster to >> show in the pidfile whether it's ready for connections or not. > Yea, that seems quite appealing, both from an architectural, simplicity, > and log noise perspective. I wonder if there's some added reliability by > the connection probe though? Essentially wondering if it'd be worthwhile > to keep a single connection test at the end. I'm somewhat disinclined > though. I agree --- part of the appeal of this idea is that there could be a net subtraction of code from pg_ctl. (I think it wouldn't have to link libpq anymore at all, though maybe I forgot something.) And you get rid of a bunch of can't-connect failure modes, eg kernel packet filter in the way, which probably outweighs any hypothetical reliability gain from confirming the postmaster state the old way. This would mean that v10 pg_ctl could not be used to start/stop older postmasters, which is flexibility we tried to preserve in the past. But I see that we already gave that up in quite a few code paths because of their attempts to read pg_control, so I think it's a concern we can ignore. I'll draft something up later. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers