mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Remove logging.c from the shared library of src/common/
Asfe0a1dc
has proved, it is not a good concept to add to libpq dependencies that would enforce the error output to a central logging facility because it breaks the promise of reporting the error back to an application in a consistent way, with the application to potentially exit() suddenly if using pieces from for example jsonapi.c. prairiedog has allowed to report an actual design problem withfe0a1dc
, but it will not be around forever, so removing logging.c from libpgcommon_shlib is a simple and much better long-term way to prevent any attempt to load the central logging in libraries with general purposes. Author: Michael Paquier Reviewed-by: Tom Lane Discussion: https://postgr.es/m/20200928073330.GC2316@paquier.xyz
This commit is contained in:
@ -88,16 +88,21 @@ OBJS_COMMON += sha2.o
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# A few files are currently only built for frontend, not server
|
# A few files are currently only built for frontend, not server
|
||||||
# (Mkvcbuild.pm has a copy of this list, too)
|
# (Mkvcbuild.pm has a copy of this list, too). logging.c is excluded
|
||||||
OBJS_FRONTEND = \
|
# from OBJS_FRONTEND_SHLIB (shared library) as a matter of policy,
|
||||||
|
# because it is not appropriate for general purpose libraries such
|
||||||
|
# as libpq to report errors directly.
|
||||||
|
OBJS_FRONTEND_SHLIB = \
|
||||||
$(OBJS_COMMON) \
|
$(OBJS_COMMON) \
|
||||||
fe_memutils.o \
|
fe_memutils.o \
|
||||||
logging.o \
|
|
||||||
restricted_token.o \
|
restricted_token.o \
|
||||||
sprompt.o
|
sprompt.o
|
||||||
|
OBJS_FRONTEND = \
|
||||||
|
$(OBJS_FRONTEND_SHLIB) \
|
||||||
|
logging.o
|
||||||
|
|
||||||
# foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c
|
# foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c
|
||||||
OBJS_SHLIB = $(OBJS_FRONTEND:%.o=%_shlib.o)
|
OBJS_SHLIB = $(OBJS_FRONTEND_SHLIB:%.o=%_shlib.o)
|
||||||
OBJS_SRV = $(OBJS_COMMON:%.o=%_srv.o)
|
OBJS_SRV = $(OBJS_COMMON:%.o=%_srv.o)
|
||||||
|
|
||||||
# where to find gen_keywordlist.pl and subsidiary files
|
# where to find gen_keywordlist.pl and subsidiary files
|
||||||
|
Reference in New Issue
Block a user