diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-05-14 14:19:49 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-05-14 14:20:10 -0400 |
commit | fc9a62af3f87f4bec1e8c904ea99ae50f3c881ef (patch) | |
tree | a566ea096bbebc18e307370917e061d49f725291 /src/bin/pg_ctl | |
parent | b71dad22ce8a645a47c01e544f640f35b91bfbd3 (diff) | |
download | postgresql-fc9a62af3f87f4bec1e8c904ea99ae50f3c881ef.tar.gz |
Move logging.h and logging.c from src/fe_utils/ to src/common/.
The original placement of this module in src/fe_utils/ is ill-considered,
because several src/common/ modules have dependencies on it, meaning that
libpgcommon and libpgfeutils now have mutual dependencies. That makes it
pointless to have distinct libraries at all. The intended design is that
libpgcommon is lower-level than libpgfeutils, so only dependencies from
the latter to the former are acceptable.
We already have the precedent that fe_memutils and a couple of other
modules in src/common/ are frontend-only, so it's not stretching anything
out of whack to treat logging.c as a frontend-only module in src/common/.
To the extent that such modules help provide a common frontend/backend
environment for the rest of common/ to use, it's a reasonable design.
(logging.c does not yet provide an ereport() emulation, but one can
dream.)
Hence, move these files over, and revert basically all of the build-system
changes made by commit cc8d41511. There are no places that need to grow
new dependencies on libpgcommon, further reinforcing the idea that this
is the right solution.
Discussion: https://postgr.es/m/a912ffff-f6e4-778a-c86a-cf5c47a12933@2ndquadrant.com
Diffstat (limited to 'src/bin/pg_ctl')
-rw-r--r-- | src/bin/pg_ctl/Makefile | 4 | ||||
-rw-r--r-- | src/bin/pg_ctl/pg_ctl.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile index b931b14a3f..83cbf97ed8 100644 --- a/src/bin/pg_ctl/Makefile +++ b/src/bin/pg_ctl/Makefile @@ -16,8 +16,6 @@ subdir = src/bin/pg_ctl top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils - # On Windows, we need to link with libpq, just for use of pqexpbuffer; # but let's not pull that in on platforms where we don't need it. ifeq ($(PORTNAME), win32) @@ -30,7 +28,7 @@ OBJS= pg_ctl.o $(WIN32RES) all: pg_ctl -pg_ctl: $(OBJS) | submake-libpgport submake-libpgfeutils $(SUBMAKE_LIBPQ) +pg_ctl: $(OBJS) | submake-libpgport $(SUBMAKE_LIBPQ) $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X) install: all installdirs diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 400763dea7..dfb6c19f5a 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -26,7 +26,7 @@ #include "catalog/pg_control.h" #include "common/controldata_utils.h" #include "common/file_perm.h" -#include "fe_utils/logging.h" +#include "common/logging.h" #include "getopt_long.h" #include "utils/pidfile.h" |