Remove unnecessary definition of CancelRequested in bin/scripts/
authorMichael Paquier <[email protected]>
Wed, 4 Dec 2019 01:06:45 +0000 (10:06 +0900)
committerMichael Paquier <[email protected]>
Wed, 4 Dec 2019 01:06:45 +0000 (10:06 +0900)
This variable is now part of the refactored code for query cancellation
in fe_utils.  This fixes an oversight in commit a4fd3aa.  While on it,
improve some header includes in bin/scripts/.

Author: Michael Paquier
Reviewed-by: Fabien Coelho
Discussion: https://postgr.es/m/20191203101625[email protected]

src/bin/scripts/clusterdb.c
src/bin/scripts/common.c
src/bin/scripts/common.h
src/bin/scripts/reindexdb.c
src/bin/scripts/scripts_parallel.c
src/bin/scripts/vacuumdb.c

index 3aee5f28349d70ad4d1303a24a0e10cdfb6c6bd9..936dd620524c803f3fdfec6fb13c507a3f01c217 100644 (file)
@@ -12,6 +12,7 @@
 #include "postgres_fe.h"
 #include "common.h"
 #include "common/logging.h"
+#include "fe_utils/cancel.h"
 #include "fe_utils/simple_list.h"
 #include "fe_utils/string_utils.h"
 
index d2a7547441a348f5e26f959abda3971c404323d3..680bbb133a3221705a98ad830584d6d9ccabf6c5 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "common.h"
 #include "common/logging.h"
+#include "fe_utils/cancel.h"
 #include "fe_utils/connect.h"
 #include "fe_utils/string_utils.h"
 
index db2f85b4720a914d73168a1f85eddbc30784ebbb..33b952ba635458fbbe47f799be27d86834980afb 100644 (file)
@@ -10,7 +10,6 @@
 #define COMMON_H
 
 #include "common/username.h"
-#include "fe_utils/cancel.h"
 #include "getopt_long.h"               /* pgrminclude ignore */
 #include "libpq-fe.h"
 #include "pqexpbuffer.h"               /* pgrminclude ignore */
@@ -22,8 +21,6 @@ enum trivalue
        TRI_YES
 };
 
-extern bool CancelRequested;
-
 typedef void (*help_handler) (const char *progname);
 
 extern void handle_help_version_opts(int argc, char *argv[],
index bedd95cf9df960b6241417ab282d1208e5cf6a04..65abe5984ec4772e21d94a1f6840d0d02e7d22b7 100644 (file)
@@ -14,6 +14,7 @@
 #include "catalog/pg_class_d.h"
 #include "common.h"
 #include "common/logging.h"
+#include "fe_utils/cancel.h"
 #include "fe_utils/connect.h"
 #include "fe_utils/simple_list.h"
 #include "fe_utils/string_utils.h"
index 97435160e95bd5e9d26b4162ebec4279452cea5d..a732f07dd8d8f6ad56047dee2c15abaca413c389 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "common.h"
 #include "common/logging.h"
+#include "fe_utils/cancel.h"
 #include "scripts_parallel.h"
 
 static void init_slot(ParallelSlot *slot, PGconn *conn);
index 83a94dc632f39cc1747ca627dace9a211da1ce60..e1623e76e3757a44437b83a41e098360874a0d45 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "common.h"
 #include "common/logging.h"
+#include "fe_utils/cancel.h"
 #include "fe_utils/connect.h"
 #include "fe_utils/simple_list.h"
 #include "fe_utils/string_utils.h"