Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYeB5-0004j1-Vn for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 00:23:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lYeB4-0004se-Ve for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Apr 2021 00:23:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYeAP-0007H1-Cu for pgsql-hackers@lists.postgresql.org; Tue, 20 Apr 2021 00:23:02 +0000 Received: from [64.147.123.25] (helo=wout2-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lYd8P-0008K9-EL for pgsql-hackers@postgresql.org; Mon, 19 Apr 2021 23:16:58 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 7DEAB21A9; Mon, 19 Apr 2021 19:16:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 19 Apr 2021 19:16:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=MvMdIVQH3RXsjtQ0HAWgQDfiz67yq81beP3vSaqRrno=; b=Y0ckknMW ZSeYwbETLhhFxX85Z1drlPiW6XG+4F2ffLexf75H1f/K2pTJyJQQzDE+T3O6t4Jt 2GfL53tJvWUh7oJdjUnAMAS1fjQqa8A0WllVp45azjp8kRnSQnG1q+6A6Dj5NP5M rN1I2CZR+hqaz7TeN1IPw12dRiZ5ab0lJ4OUGMbLx/xQ04loDWiTKcJhAMfafk50 hZMj8fIHHDAaGJExdxIC+SBEbgeijvehmdb/7tyRTzRFi7uwGzcrxkdJyPpBnK0E Ym59jV+CMKRAe6Yc5Wz4dvKHx/p6CoB6R2wj60OD4spagWJCAF8i9+OtCm/Pnln+ GN9wjFQsF8kNHA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddthedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjfgesthekredttderudenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepueffhfejieeuueffgedvudekgeeltdeviedvieeufeei ieevgfetheeufeethedvnecukfhppeduledtrdelhedrudelrdelheenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.95]) by mail.messagingengine.com (Postfix) with ESMTPA id 786AD108005B; Mon, 19 Apr 2021 19:16:40 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 328A12A0C81; Mon, 19 Apr 2021 19:16:37 -0400 (-04) Date: Mon, 19 Apr 2021 19:16:37 -0400 From: Alvaro Herrera To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: when the startup process doesn't Message-ID: <20210419231637.GA24815@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.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.25 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Apr-19, Robert Haas wrote: > Another possible approach would be to accept connections for > monitoring purposes even during crash recovery. We can't allow access > to any database at that point, since the system might not be > consistent, but we could allow something like a replication connection > (the non-database-associated variant). Hmm. We already have pg_isready, which is pretty simplistic -- it tries to connect to the server and derive a status in a very simplistic way. Can we perhaps improve on that? I think your idea of using the non-database-connected replication mode would let the server return a tuple with some status information with a new command. And then pg_isready could interpret that, or just print it. -- Álvaro Herrera 39°49'30"S 73°17'W Subversion to GIT: the shortest path to happiness I've ever heard of (Alexey Klyukin)