Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPZU8-0002dF-FE for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jun 2017 19:15:44 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dPZU8-0007qU-1u for pgsql-hackers@arkaria.postgresql.org; Mon, 26 Jun 2017 19:15:44 +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 1dPZU7-0007qL-F3 for pgsql-hackers@postgresql.org; Mon, 26 Jun 2017 19:15:43 +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 1dPZU3-0004kR-MI for pgsql-hackers@postgresql.org; Mon, 26 Jun 2017 19:15:42 +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 v5QJFbI1024993; Mon, 26 Jun 2017 15:15:37 -0400 From: Tom Lane To: Michael Paquier cc: PostgreSQL mailing lists Subject: Re: Reducing pg_ctl's reaction time In-reply-to: References: <18444.1498428798@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Mon, 26 Jun 2017 15:26:57 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24991.1498504537.1@sss.pgh.pa.us> Date: Mon, 26 Jun 2017 15:15:37 -0400 Message-ID: <24992.1498504537@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 Michael Paquier writes: > On Mon, Jun 26, 2017 at 7:13 AM, Tom Lane wrote: >> The attached proposed patch adjusts pg_ctl to check every 100msec, >> instead of every second, for the postmaster to be done starting or >> stopping. >> +#define WAITS_PER_SEC 10 /* should divide 1000000 evenly */ > As a matter of style, you could define 1000000 as well in a variable > and refer to the variable for the division. Good idea, done that way. (My initial thought was to use USECS_PER_SEC from timestamp.h, but that's declared as int64 which would have complicated matters, so I just made a new symbol.) > This also pops up more easily failures with 001_stream_rep.pl without > a patch applied from the other recent thread, so this patch had better > not get in before anything from > https://www.postgresql.org/message-id/8962.1498425057@sss.pgh.pa.us. Check. I pushed your fix for that first. Thanks for the review! 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