aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/initdb/initdb.c2
-rw-r--r--src/bin/pg_archivecleanup/Makefile4
-rw-r--r--src/bin/pg_archivecleanup/pg_archivecleanup.c2
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c2
-rw-r--r--src/bin/pg_basebackup/pg_receivewal.c2
-rw-r--r--src/bin/pg_basebackup/pg_recvlogical.c2
-rw-r--r--src/bin/pg_basebackup/receivelog.c2
-rw-r--r--src/bin/pg_basebackup/streamutil.c2
-rw-r--r--src/bin/pg_checksums/Makefile4
-rw-r--r--src/bin/pg_checksums/pg_checksums.c2
-rw-r--r--src/bin/pg_controldata/Makefile4
-rw-r--r--src/bin/pg_controldata/pg_controldata.c2
-rw-r--r--src/bin/pg_ctl/Makefile4
-rw-r--r--src/bin/pg_ctl/pg_ctl.c2
-rw-r--r--src/bin/pg_dump/common.c1
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c1
-rw-r--r--src/bin/pg_dump/pg_backup_custom.c2
-rw-r--r--src/bin/pg_dump/pg_backup_db.c4
-rw-r--r--src/bin/pg_dump/pg_backup_utils.h2
-rw-r--r--src/bin/pg_dump/pg_dump.c1
-rw-r--r--src/bin/pg_dump/pg_dump_sort.c1
-rw-r--r--src/bin/pg_dump/pg_dumpall.c2
-rw-r--r--src/bin/pg_dump/pg_restore.c2
-rw-r--r--src/bin/pg_resetwal/Makefile4
-rw-r--r--src/bin/pg_resetwal/pg_resetwal.c2
-rw-r--r--src/bin/pg_rewind/Makefile4
-rw-r--r--src/bin/pg_rewind/datapagemap.c2
-rw-r--r--src/bin/pg_rewind/pg_rewind.h2
-rw-r--r--src/bin/pg_test_fsync/Makefile4
-rw-r--r--src/bin/pg_test_fsync/pg_test_fsync.c2
-rw-r--r--src/bin/pg_upgrade/pg_upgrade.c2
-rw-r--r--src/bin/pg_waldump/Makefile3
-rw-r--r--src/bin/pg_waldump/pg_waldump.c2
-rw-r--r--src/bin/pgbench/pgbench.c2
-rw-r--r--src/bin/psql/command.c4
-rw-r--r--src/bin/psql/common.c8
-rw-r--r--src/bin/psql/copy.c2
-rw-r--r--src/bin/psql/crosstabview.c2
-rw-r--r--src/bin/psql/describe.c7
-rw-r--r--src/bin/psql/help.c6
-rw-r--r--src/bin/psql/input.c2
-rw-r--r--src/bin/psql/large_obj.c2
-rw-r--r--src/bin/psql/mainloop.c2
-rw-r--r--src/bin/psql/psqlscanslash.l2
-rw-r--r--src/bin/psql/startup.c5
-rw-r--r--src/bin/psql/variables.c2
-rw-r--r--src/bin/scripts/clusterdb.c2
-rw-r--r--src/bin/scripts/common.c2
-rw-r--r--src/bin/scripts/createdb.c2
-rw-r--r--src/bin/scripts/createuser.c2
-rw-r--r--src/bin/scripts/dropdb.c2
-rw-r--r--src/bin/scripts/dropuser.c2
-rw-r--r--src/bin/scripts/pg_isready.c2
-rw-r--r--src/bin/scripts/reindexdb.c2
-rw-r--r--src/bin/scripts/vacuumdb.c2
-rw-r--r--src/common/Makefile4
-rw-r--r--src/common/controldata_utils.c2
-rw-r--r--src/common/file_utils.c2
-rw-r--r--src/common/logging.c (renamed from src/fe_utils/logging.c)23
-rw-r--r--src/common/pgfnames.c2
-rw-r--r--src/common/restricted_token.c2
-rw-r--r--src/common/rmtree.c2
-rw-r--r--src/fe_utils/Makefile2
-rw-r--r--src/fe_utils/psqlscan.l2
-rw-r--r--src/include/common/logging.h (renamed from src/include/fe_utils/logging.h)10
-rw-r--r--src/interfaces/ecpg/test/Makefile2
-rw-r--r--src/nls-global.mk2
-rw-r--r--src/test/isolation/Makefile3
-rw-r--r--src/test/regress/GNUmakefile4
-rw-r--r--src/test/regress/pg_regress.c2
-rw-r--r--src/tools/msvc/Mkvcbuild.pm10
71 files changed, 102 insertions, 115 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 09b59c83246..5abc64f5f78 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -65,9 +65,9 @@
#include "catalog/pg_collation_d.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
+#include "common/logging.h"
#include "common/restricted_token.h"
#include "common/username.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
#include "getaddrinfo.h"
#include "getopt_long.h"
diff --git a/src/bin/pg_archivecleanup/Makefile b/src/bin/pg_archivecleanup/Makefile
index 14e834677b2..c5bf99db0f4 100644
--- a/src/bin/pg_archivecleanup/Makefile
+++ b/src/bin/pg_archivecleanup/Makefile
@@ -7,13 +7,11 @@ subdir = src/bin/pg_archivecleanup
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
OBJS = pg_archivecleanup.o $(WIN32RES)
all: pg_archivecleanup
-pg_archivecleanup: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_archivecleanup: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c
index b297f210df6..8f89be64cd4 100644
--- a/src/bin/pg_archivecleanup/pg_archivecleanup.c
+++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c
@@ -17,7 +17,7 @@
#include "pg_getopt.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "access/xlog_internal.h"
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index 1a735b80467..74d7c856648 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -29,8 +29,8 @@
#include "access/xlog_internal.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
+#include "common/logging.h"
#include "common/string.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
#include "getopt_long.h"
#include "libpq-fe.h"
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
index 9e4d296129c..5301e883754 100644
--- a/src/bin/pg_basebackup/pg_receivewal.c
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -20,7 +20,7 @@
#include <unistd.h>
#include "common/file_perm.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "libpq-fe.h"
#include "access/xlog_internal.h"
#include "getopt_long.h"
diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c
index 3c95f231a2a..547eb8de861 100644
--- a/src/bin/pg_basebackup/pg_recvlogical.c
+++ b/src/bin/pg_basebackup/pg_recvlogical.c
@@ -25,7 +25,7 @@
#include "access/xlog_internal.h"
#include "common/file_perm.h"
#include "common/fe_memutils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "libpq/pqsignal.h"
diff --git a/src/bin/pg_basebackup/receivelog.c b/src/bin/pg_basebackup/receivelog.c
index 0ff9aa19a9e..e9854527e23 100644
--- a/src/bin/pg_basebackup/receivelog.c
+++ b/src/bin/pg_basebackup/receivelog.c
@@ -27,7 +27,7 @@
#include "libpq-fe.h"
#include "access/xlog_internal.h"
#include "common/file_utils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/* fd and filename for currently open WAL file */
diff --git a/src/bin/pg_basebackup/streamutil.c b/src/bin/pg_basebackup/streamutil.c
index ab2e55d6950..79f17e4089f 100644
--- a/src/bin/pg_basebackup/streamutil.c
+++ b/src/bin/pg_basebackup/streamutil.c
@@ -24,9 +24,9 @@
#include "access/xlog_internal.h"
#include "common/fe_memutils.h"
#include "common/file_perm.h"
+#include "common/logging.h"
#include "datatype/timestamp.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "port/pg_bswap.h"
#include "pqexpbuffer.h"
diff --git a/src/bin/pg_checksums/Makefile b/src/bin/pg_checksums/Makefile
index 13a25f5e334..278b7a0f2ec 100644
--- a/src/bin/pg_checksums/Makefile
+++ b/src/bin/pg_checksums/Makefile
@@ -15,13 +15,11 @@ subdir = src/bin/pg_checksums
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
OBJS= pg_checksums.o $(WIN32RES)
all: pg_checksums
-pg_checksums: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_checksums: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 768d038d79b..37fe20bb756 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -23,7 +23,7 @@
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#include "common/file_utils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "getopt_long.h"
#include "pg_getopt.h"
#include "storage/bufpage.h"
diff --git a/src/bin/pg_controldata/Makefile b/src/bin/pg_controldata/Makefile
index 4d9c1370fe7..2d5c5621318 100644
--- a/src/bin/pg_controldata/Makefile
+++ b/src/bin/pg_controldata/Makefile
@@ -15,13 +15,11 @@ subdir = src/bin/pg_controldata
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
OBJS= pg_controldata.o $(WIN32RES)
all: pg_controldata
-pg_controldata: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_controldata: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c
index a674f52f0b8..d955b97c0b8 100644
--- a/src/bin/pg_controldata/pg_controldata.c
+++ b/src/bin/pg_controldata/pg_controldata.c
@@ -25,7 +25,7 @@
#include "access/xlog_internal.h"
#include "catalog/pg_control.h"
#include "common/controldata_utils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "pg_getopt.h"
#include "getopt_long.h"
diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile
index b931b14a3f5..83cbf97ed88 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 400763dea78..dfb6c19f5a4 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"
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c
index 5958f42a847..b402e498960 100644
--- a/src/bin/pg_dump/common.c
+++ b/src/bin/pg_dump/common.c
@@ -22,7 +22,6 @@
#include <ctype.h>
#include "catalog/pg_class_d.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 821fb4def05..d764d36936d 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -35,7 +35,6 @@
#include "pg_backup_db.h"
#include "pg_backup_utils.h"
#include "dumputils.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
#include "libpq/libpq-fs.h"
diff --git a/src/bin/pg_dump/pg_backup_custom.c b/src/bin/pg_dump/pg_backup_custom.c
index 5641d5d20fc..ae5306b9dad 100644
--- a/src/bin/pg_dump/pg_backup_custom.c
+++ b/src/bin/pg_dump/pg_backup_custom.c
@@ -29,7 +29,7 @@
#include "parallel.h"
#include "pg_backup_utils.h"
#include "common/file_utils.h"
-#include "fe_utils/logging.h"
+
/*--------
* Routines in the format interface
diff --git a/src/bin/pg_dump/pg_backup_db.c b/src/bin/pg_dump/pg_backup_db.c
index 1d636dac19d..9fd3b8a79f6 100644
--- a/src/bin/pg_dump/pg_backup_db.c
+++ b/src/bin/pg_dump/pg_backup_db.c
@@ -11,10 +11,10 @@
*/
#include "postgres_fe.h"
-#include "dumputils.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
+
+#include "dumputils.h"
#include "parallel.h"
#include "pg_backup_archiver.h"
#include "pg_backup_db.h"
diff --git a/src/bin/pg_dump/pg_backup_utils.h b/src/bin/pg_dump/pg_backup_utils.h
index c47c19af6c1..619c9fe08c8 100644
--- a/src/bin/pg_dump/pg_backup_utils.h
+++ b/src/bin/pg_dump/pg_backup_utils.h
@@ -15,7 +15,7 @@
#ifndef PG_BACKUP_UTILS_H
#define PG_BACKUP_UTILS_H
-#include "fe_utils/logging.h"
+#include "common/logging.h"
typedef enum /* bits returned by set_dump_section */
{
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 8b993d6eae8..a8f1ad73336 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -63,7 +63,6 @@
#include "pg_backup_utils.h"
#include "pg_dump.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c
index 80641cd79a2..90ec67ca671 100644
--- a/src/bin/pg_dump/pg_dump_sort.c
+++ b/src/bin/pg_dump/pg_dump_sort.c
@@ -20,7 +20,6 @@
#include "pg_dump.h"
#include "catalog/pg_class_d.h"
-#include "fe_utils/logging.h"
/*
* Sort priority for database object types.
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 3244a527f62..102731ea0c6 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -23,8 +23,8 @@
#include "dumputils.h"
#include "pg_backup.h"
#include "common/file_utils.h"
+#include "common/logging.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
/* version string we expect back from pg_dump */
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 9a5b17758f9..8a3fad3d16d 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -51,8 +51,6 @@
#include "parallel.h"
#include "pg_backup_utils.h"
-#include "fe_utils/logging.h"
-
static void usage(const char *progname);
diff --git a/src/bin/pg_resetwal/Makefile b/src/bin/pg_resetwal/Makefile
index 09ede1efd2a..2a3835691fd 100644
--- a/src/bin/pg_resetwal/Makefile
+++ b/src/bin/pg_resetwal/Makefile
@@ -15,13 +15,11 @@ subdir = src/bin/pg_resetwal
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
OBJS= pg_resetwal.o $(WIN32RES)
all: pg_resetwal
-pg_resetwal: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_resetwal: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
index 82a8ec993de..2734f873187 100644
--- a/src/bin/pg_resetwal/pg_resetwal.c
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -52,8 +52,8 @@
#include "common/controldata_utils.h"
#include "common/fe_memutils.h"
#include "common/file_perm.h"
+#include "common/logging.h"
#include "common/restricted_token.h"
-#include "fe_utils/logging.h"
#include "storage/large_object.h"
#include "pg_getopt.h"
#include "getopt_long.h"
diff --git a/src/bin/pg_rewind/Makefile b/src/bin/pg_rewind/Makefile
index 5455fd4e296..859d3abc41b 100644
--- a/src/bin/pg_rewind/Makefile
+++ b/src/bin/pg_rewind/Makefile
@@ -16,7 +16,7 @@ top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(libpq_srcdir) -DFRONTEND $(CPPFLAGS)
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils $(libpq_pgport)
+LDFLAGS_INTERNAL += $(libpq_pgport)
OBJS = pg_rewind.o parsexlog.o xlogreader.o datapagemap.o timeline.o \
fetch.o file_ops.o copy_fetch.o libpq_fetch.o filemap.o \
@@ -26,7 +26,7 @@ EXTRA_CLEAN = xlogreader.c
all: pg_rewind
-pg_rewind: $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+pg_rewind: $(OBJS) | submake-libpq submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
diff --git a/src/bin/pg_rewind/datapagemap.c b/src/bin/pg_rewind/datapagemap.c
index fc70fe57062..93165f697cd 100644
--- a/src/bin/pg_rewind/datapagemap.c
+++ b/src/bin/pg_rewind/datapagemap.c
@@ -14,7 +14,7 @@
#include "datapagemap.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
struct datapagemap_iterator
{
diff --git a/src/bin/pg_rewind/pg_rewind.h b/src/bin/pg_rewind/pg_rewind.h
index 9e6f9474d59..a54a5d7fd4e 100644
--- a/src/bin/pg_rewind/pg_rewind.h
+++ b/src/bin/pg_rewind/pg_rewind.h
@@ -17,7 +17,7 @@
#include "storage/block.h"
#include "storage/relfilenode.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/* Configuration options */
extern char *datadir_target;
diff --git a/src/bin/pg_test_fsync/Makefile b/src/bin/pg_test_fsync/Makefile
index 769daecf2b1..90496df566d 100644
--- a/src/bin/pg_test_fsync/Makefile
+++ b/src/bin/pg_test_fsync/Makefile
@@ -7,13 +7,11 @@ subdir = src/bin/pg_test_fsync
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
OBJS = pg_test_fsync.o $(WIN32RES)
all: pg_test_fsync
-pg_test_fsync: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_test_fsync: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
diff --git a/src/bin/pg_test_fsync/pg_test_fsync.c b/src/bin/pg_test_fsync/pg_test_fsync.c
index 83771061a46..225557e6c57 100644
--- a/src/bin/pg_test_fsync/pg_test_fsync.c
+++ b/src/bin/pg_test_fsync/pg_test_fsync.c
@@ -14,7 +14,7 @@
#include "getopt_long.h"
#include "access/xlogdefs.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/*
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 0b304bbd56a..ff78929707e 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -40,8 +40,8 @@
#include "pg_upgrade.h"
#include "catalog/pg_class_d.h"
#include "common/file_perm.h"
+#include "common/logging.h"
#include "common/restricted_token.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
#ifdef HAVE_LANGINFO_H
diff --git a/src/bin/pg_waldump/Makefile b/src/bin/pg_waldump/Makefile
index bfe9498b800..f5957bd75a6 100644
--- a/src/bin/pg_waldump/Makefile
+++ b/src/bin/pg_waldump/Makefile
@@ -11,7 +11,6 @@ OBJS = pg_waldump.o compat.o xlogreader.o rmgrdesc.o \
$(RMGRDESCOBJS) $(WIN32RES)
override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
@@ -19,7 +18,7 @@ RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
all: pg_waldump
-pg_waldump: $(OBJS) | submake-libpgport submake-libpgfeutils
+pg_waldump: $(OBJS) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
index f61505ade36..dab9525c684 100644
--- a/src/bin/pg_waldump/pg_waldump.c
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -21,7 +21,7 @@
#include "access/xlog_internal.h"
#include "access/transam.h"
#include "common/fe_memutils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "getopt_long.h"
#include "rmgrdesc.h"
diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c
index a03ab281a5f..a81383eb579 100644
--- a/src/bin/pgbench/pgbench.c
+++ b/src/bin/pgbench/pgbench.c
@@ -33,8 +33,8 @@
#include "postgres_fe.h"
#include "common/int.h"
+#include "common/logging.h"
#include "fe_utils/conditional.h"
-#include "fe_utils/logging.h"
#include "getopt_long.h"
#include "libpq-fe.h"
#include "portability/instr_time.h"
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 8254d610999..a2c0ec0b7ff 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -28,7 +28,8 @@
#include "libpq-fe.h"
#include "pqexpbuffer.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
+#include "fe_utils/print.h"
#include "fe_utils/string_utils.h"
#include "common.h"
@@ -39,7 +40,6 @@
#include "input.h"
#include "large_obj.h"
#include "mainloop.h"
-#include "fe_utils/print.h"
#include "psqlscanslash.h"
#include "settings.h"
#include "variables.h"
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index bd284446f8d..9579e106304 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -6,7 +6,6 @@
* src/bin/psql/common.c
*/
#include "postgres_fe.h"
-#include "common.h"
#include <ctype.h>
#include <limits.h>
@@ -19,15 +18,16 @@
#include <win32.h>
#endif
-#include "fe_utils/logging.h"
+#include "common/logging.h"
+#include "fe_utils/mbprint.h"
#include "fe_utils/string_utils.h"
#include "portability/instr_time.h"
-#include "settings.h"
#include "command.h"
+#include "common.h"
#include "copy.h"
#include "crosstabview.h"
-#include "fe_utils/mbprint.h"
+#include "settings.h"
static bool DescribeQuery(const char *query, double *elapsed_msec);
diff --git a/src/bin/psql/copy.c b/src/bin/psql/copy.c
index def177693ed..b02177a5c2a 100644
--- a/src/bin/psql/copy.c
+++ b/src/bin/psql/copy.c
@@ -24,7 +24,7 @@
#include "prompt.h"
#include "stringutils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/*
* parse_slash_copy
diff --git a/src/bin/psql/crosstabview.c b/src/bin/psql/crosstabview.c
index 6afd3e0939c..390f750c412 100644
--- a/src/bin/psql/crosstabview.c
+++ b/src/bin/psql/crosstabview.c
@@ -13,7 +13,7 @@
#include "psqlscanslash.h"
#include "settings.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/*
* Value/position from the resultset that goes into the horizontal or vertical
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index ee00c5da08a..773107227dd 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -18,13 +18,14 @@
#include "catalog/pg_cast_d.h"
#include "catalog/pg_class_d.h"
#include "catalog/pg_default_acl_d.h"
-#include "fe_utils/logging.h"
+
+#include "common/logging.h"
+#include "fe_utils/mbprint.h"
+#include "fe_utils/print.h"
#include "fe_utils/string_utils.h"
#include "common.h"
#include "describe.h"
-#include "fe_utils/mbprint.h"
-#include "fe_utils/print.h"
#include "settings.h"
#include "variables.h"
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c
index d6d41b51d53..5fb1baadc57 100644
--- a/src/bin/psql/help.c
+++ b/src/bin/psql/help.c
@@ -21,15 +21,15 @@
#include <termios.h>
#endif
-#include "common.h"
+#include "common/logging.h"
#include "common/username.h"
+
+#include "common.h"
#include "help.h"
#include "input.h"
#include "settings.h"
#include "sql_help.h"
-#include "fe_utils/logging.h"
-
/*
* PLEASE:
* If you change something in this file, also make the same changes
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c
index 93c0d4c49e4..5a18ac9bbc4 100644
--- a/src/bin/psql/input.c
+++ b/src/bin/psql/input.c
@@ -18,7 +18,7 @@
#include "tab-complete.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#ifndef WIN32
#define PSQLHISTORY ".psql_history"
diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c
index cecb4897f5a..2713f15d4f3 100644
--- a/src/bin/psql/large_obj.c
+++ b/src/bin/psql/large_obj.c
@@ -11,7 +11,7 @@
#include "settings.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
static void print_lo_result(const char *fmt,...) pg_attribute_printf(1, 2);
diff --git a/src/bin/psql/mainloop.c b/src/bin/psql/mainloop.c
index 3ae447041fa..e386d9888d7 100644
--- a/src/bin/psql/mainloop.c
+++ b/src/bin/psql/mainloop.c
@@ -14,7 +14,7 @@
#include "prompt.h"
#include "settings.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "mb/pg_wchar.h"
diff --git a/src/bin/psql/psqlscanslash.l b/src/bin/psql/psqlscanslash.l
index f7818e6e603..c2e3bfe9d0c 100644
--- a/src/bin/psql/psqlscanslash.l
+++ b/src/bin/psql/psqlscanslash.l
@@ -19,8 +19,8 @@
#include "postgres_fe.h"
#include "psqlscanslash.h"
+#include "common/logging.h"
#include "fe_utils/conditional.h"
-#include "fe_utils/logging.h"
#include "libpq-fe.h"
}
diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c
index 855133bbcb4..7c5b45f7cce 100644
--- a/src/bin/psql/startup.c
+++ b/src/bin/psql/startup.c
@@ -16,14 +16,15 @@
#include "getopt_long.h"
+#include "common/logging.h"
+#include "fe_utils/print.h"
+
#include "command.h"
#include "common.h"
#include "describe.h"
#include "help.h"
#include "input.h"
#include "mainloop.h"
-#include "fe_utils/logging.h"
-#include "fe_utils/print.h"
#include "settings.h"
diff --git a/src/bin/psql/variables.c b/src/bin/psql/variables.c
index 5d47d5a8ab0..e456b9db2f8 100644
--- a/src/bin/psql/variables.c
+++ b/src/bin/psql/variables.c
@@ -10,7 +10,7 @@
#include "common.h"
#include "variables.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/*
diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c
index dd0ba68864d..a1b4119efa5 100644
--- a/src/bin/scripts/clusterdb.c
+++ b/src/bin/scripts/clusterdb.c
@@ -11,7 +11,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c
index a42afd490b0..296029d8093 100644
--- a/src/bin/scripts/common.c
+++ b/src/bin/scripts/common.c
@@ -18,8 +18,8 @@
#include <unistd.h>
#include "common.h"
+#include "common/logging.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c
index e4b497859b5..64bcc20cb48 100644
--- a/src/bin/scripts/createdb.c
+++ b/src/bin/scripts/createdb.c
@@ -12,7 +12,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c
index 6db0dbf2a37..973ba525b25 100644
--- a/src/bin/scripts/createuser.c
+++ b/src/bin/scripts/createuser.c
@@ -12,7 +12,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c
index 42a9bd46860..dacd8e5f1dc 100644
--- a/src/bin/scripts/dropdb.c
+++ b/src/bin/scripts/dropdb.c
@@ -12,7 +12,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c
index 831243815a3..3501a06ecb1 100644
--- a/src/bin/scripts/dropuser.c
+++ b/src/bin/scripts/dropuser.c
@@ -12,7 +12,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/pg_isready.c b/src/bin/scripts/pg_isready.c
index fe15507caf7..079447f9510 100644
--- a/src/bin/scripts/pg_isready.c
+++ b/src/bin/scripts/pg_isready.c
@@ -11,7 +11,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#define DEFAULT_CONNECT_TIMEOUT "3"
diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c
index 897ad9a71a2..ba4d10e65c1 100644
--- a/src/bin/scripts/reindexdb.c
+++ b/src/bin/scripts/reindexdb.c
@@ -11,7 +11,7 @@
#include "postgres_fe.h"
#include "common.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c
index e9da74c3bae..6d216aab6b8 100644
--- a/src/bin/scripts/vacuumdb.c
+++ b/src/bin/scripts/vacuumdb.c
@@ -19,8 +19,8 @@
#include "catalog/pg_class_d.h"
#include "common.h"
+#include "common/logging.h"
#include "fe_utils/connect.h"
-#include "fe_utils/logging.h"
#include "fe_utils/simple_list.h"
#include "fe_utils/string_utils.h"
diff --git a/src/common/Makefile b/src/common/Makefile
index d84c7b6e6ae..2f22b9b101d 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -59,7 +59,9 @@ OBJS_COMMON += sha2.o
endif
# A few files are currently only built for frontend, not server
-OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o file_utils.o restricted_token.o
+# (Mkvcbuild.pm has a copy of this list, too)
+OBJS_FRONTEND = $(OBJS_COMMON) fe_memutils.o file_utils.o \
+ logging.o restricted_token.o
# foo.o, foo_shlib.o, and foo_srv.o are all built from foo.c
OBJS_SHLIB = $(OBJS_FRONTEND:%.o=%_shlib.o)
diff --git a/src/common/controldata_utils.c b/src/common/controldata_utils.c
index efca14ba544..2c28e51e111 100644
--- a/src/common/controldata_utils.c
+++ b/src/common/controldata_utils.c
@@ -29,7 +29,7 @@
#include "common/controldata_utils.h"
#include "common/file_perm.h"
#ifdef FRONTEND
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#endif
#include "port/pg_crc32c.h"
diff --git a/src/common/file_utils.c b/src/common/file_utils.c
index a43c82b4b44..eaec568819e 100644
--- a/src/common/file_utils.c
+++ b/src/common/file_utils.c
@@ -20,7 +20,7 @@
#include <unistd.h>
#include "common/file_utils.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
/* Define PG_FLUSH_DATA_WORKS if we have an implementation for pg_flush_data */
diff --git a/src/fe_utils/logging.c b/src/common/logging.c
index 2f571ae3c98..59f60445c72 100644
--- a/src/fe_utils/logging.c
+++ b/src/common/logging.c
@@ -1,9 +1,9 @@
/*-------------------------------------------------------------------------
* Logging framework for frontend programs
*
- * Copyright (c) 2018, PostgreSQL Global Development Group
+ * Copyright (c) 2018-2019, PostgreSQL Global Development Group
*
- * src/fe_utils/logging.c
+ * src/common/logging.c
*
*-------------------------------------------------------------------------
*/
@@ -11,14 +11,15 @@
#include <unistd.h>
-#include "fe_utils/logging.h"
-
-static const char *progname;
+#include "common/logging.h"
enum pg_log_level __pg_log_level;
+
+static const char *progname;
static int log_flags;
-void (*log_pre_callback)(void);
-void (*log_locus_callback)(const char **, uint64 *);
+
+static void (*log_pre_callback)(void);
+static void (*log_locus_callback)(const char **, uint64 *);
static const char *sgr_error = NULL;
static const char *sgr_warning = NULL;
@@ -146,7 +147,12 @@ pg_log_generic_v(enum pg_log_level level, const char * pg_restrict fmt, va_list
Assert(fmt);
Assert(fmt[strlen(fmt) - 1] != '\n');
+ /*
+ * Flush stdout before output to stderr, to ensure sync even when stdout
+ * is buffered.
+ */
fflush(stdout);
+
if (log_pre_callback)
log_pre_callback();
@@ -220,9 +226,10 @@ pg_log_generic_v(enum pg_log_level level, const char * pg_restrict fmt, va_list
vsnprintf(buf, required_len, fmt, ap);
/* strip one newline, for PQerrorMessage() */
- if (buf[required_len - 2] == '\n')
+ if (required_len >= 2 && buf[required_len - 2] == '\n')
buf[required_len - 2] = '\0';
fprintf(stderr, "%s\n", buf);
+
free(buf);
}
diff --git a/src/common/pgfnames.c b/src/common/pgfnames.c
index 95b17e47d89..c99c4822015 100644
--- a/src/common/pgfnames.c
+++ b/src/common/pgfnames.c
@@ -23,7 +23,7 @@
#ifndef FRONTEND
#define pg_log_warning(...) elog(WARNING, __VA_ARGS__)
#else
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#endif
/*
diff --git a/src/common/restricted_token.c b/src/common/restricted_token.c
index 3f57ff8b40b..dd077a6e0e2 100644
--- a/src/common/restricted_token.c
+++ b/src/common/restricted_token.c
@@ -20,8 +20,8 @@
#include "postgres_fe.h"
+#include "common/logging.h"
#include "common/restricted_token.h"
-#include "fe_utils/logging.h"
#ifdef WIN32
diff --git a/src/common/rmtree.c b/src/common/rmtree.c
index b31da3adff8..2c3c4dd2d44 100644
--- a/src/common/rmtree.c
+++ b/src/common/rmtree.c
@@ -23,7 +23,7 @@
#ifndef FRONTEND
#define pg_log_warning(...) elog(WARNING, __VA_ARGS__)
#else
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#endif
diff --git a/src/fe_utils/Makefile b/src/fe_utils/Makefile
index 960ecf0b6ab..7d738003237 100644
--- a/src/fe_utils/Makefile
+++ b/src/fe_utils/Makefile
@@ -19,7 +19,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
-OBJS = logging.o mbprint.o print.o psqlscan.o simple_list.o string_utils.o conditional.o
+OBJS = mbprint.o print.o psqlscan.o simple_list.o string_utils.o conditional.o
all: libpgfeutils.a
diff --git a/src/fe_utils/psqlscan.l b/src/fe_utils/psqlscan.l
index 850754ea952..ce209363399 100644
--- a/src/fe_utils/psqlscan.l
+++ b/src/fe_utils/psqlscan.l
@@ -34,7 +34,7 @@
*/
#include "postgres_fe.h"
-#include "fe_utils/logging.h"
+#include "common/logging.h"
#include "fe_utils/psqlscan.h"
#include "libpq-fe.h"
diff --git a/src/include/fe_utils/logging.h b/src/include/common/logging.h
index b5f0ddc8347..5a3249198ae 100644
--- a/src/include/fe_utils/logging.h
+++ b/src/include/common/logging.h
@@ -1,14 +1,14 @@
/*-------------------------------------------------------------------------
* Logging framework for frontend programs
*
- * Copyright (c) 2018, PostgreSQL Global Development Group
+ * Copyright (c) 2018-2019, PostgreSQL Global Development Group
*
- * src/include/fe_utils/logging.h
+ * src/include/common/logging.h
*
*-------------------------------------------------------------------------
*/
-#ifndef FE_UTILS_LOGGING_H
-#define FE_UTILS_LOGGING_H
+#ifndef COMMON_LOGGING_H
+#define COMMON_LOGGING_H
/*
* Log levels are informational only. They do not affect program flow.
@@ -92,4 +92,4 @@ void pg_log_generic_v(enum pg_log_level level, const char * pg_restrict fmt, va_
if (unlikely(__pg_log_level <= PG_LOG_DEBUG)) pg_log_generic(PG_LOG_DEBUG, __VA_ARGS__); \
} while(0)
-#endif /* FE_UTILS_LOGGING_H */
+#endif /* COMMON_LOGGING_H */
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
index e6d6f80eef0..be53b7b94dc 100644
--- a/src/interfaces/ecpg/test/Makefile
+++ b/src/interfaces/ecpg/test/Makefile
@@ -15,8 +15,6 @@ override CPPFLAGS := \
'-DDLSUFFIX="$(DLSUFFIX)"' \
$(CPPFLAGS)
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
# default encoding for regression tests
ENCODING = SQL_ASCII
diff --git a/src/nls-global.mk b/src/nls-global.mk
index 797e0dd683d..5bb77b40ebb 100644
--- a/src/nls-global.mk
+++ b/src/nls-global.mk
@@ -67,7 +67,7 @@ BACKEND_COMMON_GETTEXT_FLAGS = \
errhint:1:c-format \
errcontext:1:c-format
-FRONTEND_COMMON_GETTEXT_FILES = $(top_srcdir)/src/fe_utils/logging.c
+FRONTEND_COMMON_GETTEXT_FILES = $(top_srcdir)/src/common/logging.c
FRONTEND_COMMON_GETTEXT_TRIGGERS = \
pg_log_fatal pg_log_error pg_log_warning pg_log_info pg_log_generic:2 pg_log_generic_v:2
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
index fbbbca05c51..c3c8280ea23 100644
--- a/src/test/isolation/Makefile
+++ b/src/test/isolation/Makefile
@@ -10,7 +10,6 @@ top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS)
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
OBJS = specparse.o isolationtester.o $(WIN32RES)
@@ -32,7 +31,7 @@ pg_regress.o: | submake-regress
pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
-isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
distprep: specparse.c specscanner.c
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 38fd25e5699..a24cfd4e016 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -23,8 +23,6 @@ ifdef MAX_CONNECTIONS
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
endif
-LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
-
# stuff to pass into build of pg_regress
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
'-DSHELLPROG="$(SHELL)"' \
@@ -38,7 +36,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
all: pg_regress$(X)
-pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-libpgfeutils
+pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
# dependencies ensure that path changes propagate
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 0902b1fa97a..a1a3d487482 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -31,9 +31,9 @@
#include "pg_regress.h"
+#include "common/logging.h"
#include "common/restricted_token.h"
#include "common/username.h"
-#include "fe_utils/logging.h"
#include "getopt_long.h"
#include "libpq/pqcomm.h" /* needed for UNIXSOCK_PATH() */
#include "pg_config_paths.h"
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index f466df88477..e07e4593cda 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -136,12 +136,12 @@ sub mkvcbuild
our @pgcommonfrontendfiles = (
@pgcommonallfiles, qw(fe_memutils.c file_utils.c
- restricted_token.c));
+ logging.c restricted_token.c));
our @pgcommonbkndfiles = @pgcommonallfiles;
our @pgfeutilsfiles = qw(
- conditional.c logging.c mbprint.c print.c psqlscan.l psqlscan.c simple_list.c string_utils.c);
+ conditional.c mbprint.c print.c psqlscan.l psqlscan.c simple_list.c string_utils.c);
$libpgport = $solution->AddProject('libpgport', 'lib', 'misc');
$libpgport->AddDefine('FRONTEND');
@@ -321,7 +321,7 @@ sub mkvcbuild
$pgregress_ecpg->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_ecpg->AddLibrary('ws2_32.lib');
$pgregress_ecpg->AddDirResourceFile('src/interfaces/ecpg/test');
- $pgregress_ecpg->AddReference($libpgfeutils, $libpgcommon, $libpgport);
+ $pgregress_ecpg->AddReference($libpgcommon, $libpgport);
my $isolation_tester =
$solution->AddProject('isolationtester', 'exe', 'misc');
@@ -347,7 +347,7 @@ sub mkvcbuild
$pgregress_isolation->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress_isolation->AddLibrary('ws2_32.lib');
$pgregress_isolation->AddDirResourceFile('src/test/isolation');
- $pgregress_isolation->AddReference($libpgfeutils, $libpgcommon, $libpgport);
+ $pgregress_isolation->AddReference($libpgcommon, $libpgport);
# src/bin
my $D;
@@ -826,7 +826,7 @@ sub mkvcbuild
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress->AddLibrary('ws2_32.lib');
$pgregress->AddDirResourceFile('src/test/regress');
- $pgregress->AddReference($libpgfeutils, $libpgcommon, $libpgport);
+ $pgregress->AddReference($libpgcommon, $libpgport);
# fix up pg_waldump once it's been set up
# files symlinked on Unix are copied on windows