Re: PG12, PGXS and linking pgfeutils
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Ian Barwick <ian.barwick@2ndquadrant.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2019-05-09T17:39:11Z
Lists: pgsql-hackers
On 2019-May-09, Tom Lane wrote: > I'm not especially on board with the idea of moving FE-specific error > handling code into libpgcommon, as that breaks the concept that > src/common/ is broadly for code that can work in either frontend or > backend contexts. However, we already have a few violations of that > rule: common/Makefile already has > > # A few files are currently only built for frontend, not server > OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o file_utils.o restricted_token.o > > So maybe the answer is to move these logging support functions into > src/common, in a file that's only built for frontend. I wonder if a better solution isn't to move the file_utils stuff to fe_utils. Half of it is frontend-specific. The only one that should be shared to backend seems to be fsync_fname ... but instead of sharing it, we have a second copy in fd.c. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Move logging.h and logging.c from src/fe_utils/ to src/common/.
- fc9a62af3f87 12.0 landed
-
Remove pg_rewind's private logging.h/logging.c files.
- 53ddefbaf8a0 12.0 landed
-
Unified logging system for command-line programs
- cc8d41511721 12.0 cited