aboutsummaryrefslogtreecommitdiff
path: root/src/bin/scripts
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2019-05-14 14:19:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2019-05-14 14:20:10 -0400
commitfc9a62af3f87f4bec1e8c904ea99ae50f3c881ef (patch)
treea566ea096bbebc18e307370917e061d49f725291 /src/bin/scripts
parentb71dad22ce8a645a47c01e544f640f35b91bfbd3 (diff)
downloadpostgresql-fc9a62af3f87f4bec1e8c904ea99ae50f3c881ef.tar.gz
postgresql-fc9a62af3f87f4bec1e8c904ea99ae50f3c881ef.zip
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/scripts')
-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
9 files changed, 9 insertions, 9 deletions
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"