Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQHiE-0003XV-Lf for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jun 2017 18:29:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dQHiE-0001uc-8Y for pgsql-hackers@arkaria.postgresql.org; Wed, 28 Jun 2017 18:29:14 +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 1dQHiD-0001tU-1A for pgsql-hackers@postgresql.org; Wed, 28 Jun 2017 18:29:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dQHiA-0002k7-Cg for pgsql-hackers@postgresql.org; Wed, 28 Jun 2017 18:29:11 +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 v5SIT7X0000319; Wed, 28 Jun 2017 14:29:07 -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: <20170628173457.yhq7zmfhjdcfvkto@alap3.anarazel.de> References: <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> <17327.1498515236@sss.pgh.pa.us> <15323.1498589958@sss.pgh.pa.us> <20170627200544.2czwjtdtyy4gr4sv@alap3.anarazel.de> <30238.1498671087@sss.pgh.pa.us> <20170628173457.yhq7zmfhjdcfvkto@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 28 Jun 2017 10:34:57 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <317.1498674547.1@sss.pgh.pa.us> Date: Wed, 28 Jun 2017 14:29:07 -0400 Message-ID: <318.1498674547@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-28 13:31:27 -0400, Tom Lane wrote: >> While looking this over again, I got worried about the fact that pg_ctl >> is #including "miscadmin.h". That's a pretty low-level backend header >> and it wouldn't be surprising at all if somebody tried to put stuff in >> it that wouldn't compile frontend-side. I think we should take the >> opportunity, as long as we're touching this stuff, to split the #defines >> that describe the contents of postmaster.pid into a separate header file. >> Maybe "utils/pidfile.h" ? > Yes, that sounds like a valid concern, and solution. So when I removed the miscadmin.h include, I found out that pg_ctl is also relying on PG_BACKEND_VERSIONSTR from that file. There are at least three things we could do here: 1. Give this up as not worth this much trouble. 2. Move PG_BACKEND_VERSIONSTR into pg_config.h to go along with the other version-related macros. 3. Give PG_BACKEND_VERSIONSTR its very own new header file. Any preferences? 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