On Mon, Dec 02, 2019 at 11:54:02AM +0900, Michael Paquier wrote: > Committed the patch after splitting things into two commits and after > testing things from Linux and from a Windows console: the actual > refactoring and the pgbench changes.
I have found that we have a useless declaration of CancelRequested in common.h, which is already part of cancel.h. On top of that I think that we need to rework a bit the header inclusions of bin/scripts/, as per the attached. A small set of issues, still these are issues. Sorry for having missed these. -- Michael
diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c index 3aee5f2834..936dd62052 100644 --- a/src/bin/scripts/clusterdb.c +++ b/src/bin/scripts/clusterdb.c @@ -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" diff --git a/src/bin/scripts/common.c b/src/bin/scripts/common.c index d2a7547441..680bbb133a 100644 --- a/src/bin/scripts/common.c +++ b/src/bin/scripts/common.c @@ -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" diff --git a/src/bin/scripts/common.h b/src/bin/scripts/common.h index db2f85b472..33b952ba63 100644 --- a/src/bin/scripts/common.h +++ b/src/bin/scripts/common.h @@ -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[], diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index bedd95cf9d..65abe5984e 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -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" diff --git a/src/bin/scripts/scripts_parallel.c b/src/bin/scripts/scripts_parallel.c index 97435160e9..a732f07dd8 100644 --- a/src/bin/scripts/scripts_parallel.c +++ b/src/bin/scripts/scripts_parallel.c @@ -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); diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index 83a94dc632..e1623e76e3 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -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"
signature.asc
Description: PGP signature