pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: where EXEC_BACKEND is defined
Date: Fri, 20 Mar 2020 12:36:07 -0400
Message-ID: <16021.1584722167@sss.pgh.pa.us> (raw)
In-Reply-To: <b7053ba8-b008-5335-31de-2fe4fe41ef0f@2ndquadrant.com>
References: <b7053ba8-b008-5335-31de-2fe4fe41ef0f@2ndquadrant.com>

Peter Eisentraut <peter.eisentraut@2ndquadrant.com> 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





view thread (3+ messages)  latest in thread

Message-ID: <16021.1584722167@sss.pgh.pa.us>
Permalink:  ../16021.1584722167@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16021.1584722167@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@2ndquadrant.com
  Subject: Re: where EXEC_BACKEND is defined
  In-Reply-To: <16021.1584722167@sss.pgh.pa.us>
  References: <b7053ba8-b008-5335-31de-2fe4fe41ef0f@2ndquadrant.com> <16021.1584722167@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox