Re: Inconsistencies around defining FRONTEND
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>, Tom Lane <tgl@sss.pgh.pa.us>, Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org, samay sharma <smilingsamay@gmail.com>, Nazir Bilal Yavuz <byavuz81@gmail.com>
Date: 2022-08-22T15:48:34Z
Lists: pgsql-hackers
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 7143b3e8213. > > I don't think we need FRONTEND in initdb - looks like that stopped being > required with af1a949109d. I think the patches for this are fairly obvious, and survived CI without an issue [1], so the src/tools/msvc bits work too. So I'm planning to push them fairly soon. But the remaining "issues" don't have an obvious solutions and not addressed by these patches: > 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, xlogstats.c, rmgrdesc/*desc.c > > I'm kind of wondering if we should add xlogreader.c, xlogstat.c, *desc to > fe_utils, instead of building them in various places. That'd leave us only > with #define FRONTENDs for cases that do need to include postgres.h > themselves, which seems a lot more palatable. Greetings, Andres Freund [1] https://cirrus-ci.com/build/4648937721167872
Commits
-
Don't define FRONTEND for ecpg libraries
- 9352d5cf128a 16.0 landed
-
Don't define FRONTEND for initdb
- 06e3559bade1 16.0 landed
-
Don't define FRONTEND for libpq
- 1d77afefbd1d 16.0 landed