Re: Inconsistencies around defining FRONTEND

2022-08-24 Thread Andres Freund
Hi, On 2022-08-24 10:40:01 -0400, Robert Haas wrote: > pg_rewind and pg_waldump seem to need the xlogreader code moved to > src/common, as Andres proposes. I'm not volunteering to tackle that > right now but I think it might be a good thing to do sometime. The easier way would be to just keep the

Re: Inconsistencies around defining FRONTEND

2022-08-24 Thread Robert Haas
On Tue, Aug 23, 2022 at 9:55 PM Andres Freund wrote: > We could, if we make xlogreader.c and the rmgrdesc routines built as part of > src/common. I don't really see how otherwise. After a little bit of study, I agree. It looks to me like -DFRONTEND can be removed from src/fe_utils/Makefile and p

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Andres Freund
Hi, On 2022-08-23 19:50:00 -0400, Tom Lane wrote: > Robert Haas writes: > > On Tue, Aug 23, 2022 at 7:24 PM Andres Freund wrote: > >> Just to make sure I understand - you're just trying to get rid of the > >> #define > >> frontends, not the -DFRONTENDs passed in from the Makefile? Because afaic

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Tom Lane
Robert Haas writes: > On Tue, Aug 23, 2022 at 7:24 PM Andres Freund wrote: >> Just to make sure I understand - you're just trying to get rid of the #define >> frontends, not the -DFRONTENDs passed in from the Makefile? Because afaics we >> still need those, correct? > Oh, yeah, this only fixes t

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Robert Haas
On Tue, Aug 23, 2022 at 7:24 PM Andres Freund wrote: > Just to make sure I understand - you're just trying to get rid of the #define > frontends, not the -DFRONTENDs passed in from the Makefile? Because afaics we > still need those, correct? Oh, yeah, this only fixes the #define ones. But maybe f

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Andres Freund
Hi, On 2022-08-23 17:24:30 -0400, Robert Haas wrote: > On Sat, Aug 20, 2022 at 3:46 PM Andres Freund wrote: > > Unfortunately, the remaining uses of FRONTEND are required. That's: > > - pg_controldata, via #define > > - pg_resetwal, via #define > > - pg_rewind, via -DFRONTEND, due to xlogreader.c

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Robert Haas
On Tue, Aug 23, 2022 at 5:56 PM Tom Lane wrote: > Robert Haas writes: > > Actually, I think we could fix these pretty easily too. See attached. > > Hmm, do these headers still pass headerscheck/cpluspluscheck? I didn't check before sending the patch, but now I ran it locally, and I did get failu

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Tom Lane
Robert Haas writes: > Actually, I think we could fix these pretty easily too. See attached. Hmm, do these headers still pass headerscheck/cpluspluscheck? I might quibble a bit with the exact placement of the #ifndef FRONTEND tests, but overall this looks pretty plausible.

Re: Inconsistencies around defining FRONTEND

2022-08-23 Thread Robert Haas
On Sat, Aug 20, 2022 at 3:46 PM Andres Freund wrote: > Unfortunately, the remaining uses of FRONTEND are required. That's: > - pg_controldata, via #define > - pg_resetwal, via #define > - pg_rewind, via -DFRONTEND, due to xlogreader.c > - pg_waldump, via #define and -DFRONTEND, due to xlogreader.c

Re: Inconsistencies around defining FRONTEND

2022-08-22 Thread Andres Freund
Hi, On 2022-08-22 08:48:34 -0700, Andres Freund wrote: > On 2022-08-20 12:45:50 -0700, Andres Freund wrote: > > The -DFRONTENDs for the various ecpg libraries don't seem necessary > > anymore. That looks to be a leftover from 7143b3e8213, before that ecpg had > > copies of various pgport libraries

Re: Inconsistencies around defining FRONTEND

2022-08-22 Thread Andres Freund
Hi, On 2022-08-20 12:45:50 -0700, Andres Freund wrote: > The -DFRONTENDs for the various ecpg libraries don't seem necessary > anymore. That looks to be a leftover from 7143b3e8213, before that ecpg had > copies of various pgport libraries. > > Same with libpq, also looks to be obsoleted by 7143b3

Inconsistencies around defining FRONTEND

2022-08-20 Thread Andres Freund
Hi, This started at https://postgr.es/m/20220817215317.poeofidf7o7dy6hy%40awork3.anarazel.de Peter made a good point about -DFRONTED not being defined symmetrically between meson and autoconf builds, which made me look at where we define it. And I think we ought to clean this up independ of the