Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jFKd3-0002R8-U4 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2020 16:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jFKd2-000319-N3 for pgsql-hackers@arkaria.postgresql.org; Fri, 20 Mar 2020 16:36:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jFKd2-00030y-AP for pgsql-hackers@lists.postgresql.org; Fri, 20 Mar 2020 16:36:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jFKcz-000391-Mr for pgsql-hackers@postgresql.org; Fri, 20 Mar 2020 16:36: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 02KGa71x016022; Fri, 20 Mar 2020 12:36:07 -0400 From: Tom Lane To: Peter Eisentraut cc: pgsql-hackers Subject: Re: where EXEC_BACKEND is defined In-reply-to: References: Comments: In-reply-to Peter Eisentraut message dated "Fri, 20 Mar 2020 16:24:39 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16020.1584722167.1@sss.pgh.pa.us> Date: Fri, 20 Mar 2020 12:36:07 -0400 Message-ID: <16021.1584722167@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Peter Eisentraut writes: > I noticed that when you want to define EXEC_BACKEND, perhaps to do some > non-Windows testing of that option, it's not clear how to do that. I > would have expected it in pg_config_manual.h, but it's actually in > configure.in and in MSBuildProject.pm. So if you want to define it > yourself, you kind of have to make up your own way to do it. Yeah. Personally, I tend to add the #define to pg_config.h manually after running configure; I find this convenient because the effects automatically go away at "make distclean", and I don't have to remember to undo anything. > I don't see why this should be like that. I propose the attached patch > to move the thing to pg_config_manual.h. I wouldn't use the option of editing pg_config_manual.h myself, because of the need to undo it + risk of forgetting and committing that as part of a patch. Still, this patch doesn't get in the way of continuing to set it in pg_config.h, and it does offer a place to document the thing which is a good idea as you say. So no objection here. One small point is that I believe the existing code has the effect of "#define EXEC_BACKEND 1" not just "#define EXEC_BACKEND". I don't think this matters to anyplace in the core code, but it's conceivable that somebody has extension code written to assume the former. Nonetheless, I'm +1 for re-standardizing on the latter, because it's a couple less keystrokes when inserting a manual definition ;-). Might be worth mentioning in the commit log entry though. regards, tom lane