Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bEIWs-0007Ee-LR for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jun 2016 15:51:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bEIWr-0001cN-Nd for pgsql-hackers@arkaria.postgresql.org; Sat, 18 Jun 2016 15:51:25 +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 1bEIWq-0001cD-Rt; Sat, 18 Jun 2016 15:51:24 +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 1bEIWm-0005jy-Fp; Sat, 18 Jun 2016 15:51:24 +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 u5IFpARP013341; Sat, 18 Jun 2016 11:51:10 -0400 From: Tom Lane To: sobomax@freebsd.org cc: pgsql-bugs@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [BUGS] BUG #14199: The pg_ctl status check on server start is not compatible with the silent_mode=on In-reply-to: <20160618042812.5798.85609@wrigleys.postgresql.org> References: <20160618042812.5798.85609@wrigleys.postgresql.org> Comments: In-reply-to sobomax@freebsd.org message dated "Sat, 18 Jun 2016 04:28:12 -0000" Date: Sat, 18 Jun 2016 11:51:10 -0400 Message-ID: <13340.1466265070@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) 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 sobomax@freebsd.org writes: > There is a problem with pg_ctl when it tries to start server with the > "silent_mode=on" option enabled in postgresql.conf. Specifically, this > option causes postgres to fork once more after start. There are two problems > caused by that: > 1. The pm_pid recorded by the pg_ctl when doing fork+execve no longer > matches the PID in the postmaster.pid file. This causes pg_ctl bail out > immediately. > 2. Method that pg_ctl uses to poll if postgres exited prematurely no longer > works. > For some reason it was not a problem until recently. After reviewing recent commits, I realize that this was caused by https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=c869a7d5b While generally that was a good thing, in hindsight it's obvious that it doesn't work with silent_mode. That's a non-issue in 9.2 and later since silent_mode is gone anyway, but it is an issue for 9.1. > Attached patch fixes that issue by changing the way pg_ctl polls on the > child status. There is no need of this complication in >= 9.2. We could maybe apply it in the 9.1 branch only, but I am quite loath to accept such a nontrivial and portability-sensitive change that way. The main reason being that 9.1 is almost EOL: its next minor release might well be its last. If there's anything wrong with this approach, we may not find out about it until after 9.1 is out of support and won't get patched anymore. What seems like a more conservative answer to me is to revert c869a7d5b in 9.1 only, and address the buildfarm stability issue it sought to resolve by increasing the fixed timeout from 5 seconds to, say, 10. Thoughts? 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