From e7b4a1e0e35cdc7547e40bc9860eb6e32be569d8 Mon Sep 17 00:00:00 2001 From: Pavan Deolasee Date: Tue, 17 Jul 2018 10:26:50 +0530 Subject: [PATCH] Teach pgxc_ctl to use the new --waldir option of pg_basebackup PG 10 replaced --xlogdir with --waldir, but we forgot to update pgxc_ctl to use the new syntax. This patch fixes that oversight. Per report and analysis by Virendra Kumar and patch by Mark Wong. --- contrib/pgxc_ctl/datanode_cmd.c | 2 +- contrib/pgxc_ctl/do_command.c | 4 ++-- doc/src/sgml/pgxc_ctl-ref.sgml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/pgxc_ctl/datanode_cmd.c b/contrib/pgxc_ctl/datanode_cmd.c index ee048d9711..4e7ecc9b72 100644 --- a/contrib/pgxc_ctl/datanode_cmd.c +++ b/contrib/pgxc_ctl/datanode_cmd.c @@ -1487,7 +1487,7 @@ int add_datanodeSlave(char *name, char *host, int port, int pooler, char *dir, doImmediate(host, NULL, "pg_basebackup -p %s -h %s -D %s -X stream %s %s", aval(VAR_datanodePorts)[idx], aval(VAR_datanodeMasterServers)[idx], dir, - wal ? "--xlogdir" : "", + wal ? "--waldir" : "", wal ? walDir : ""); /* Update the slave configuration with hot standby and port */ if ((f = pgxc_popen_w(host, "cat >> %s/postgresql.conf", dir)) == NULL) diff --git a/contrib/pgxc_ctl/do_command.c b/contrib/pgxc_ctl/do_command.c index 916b024253..6fed22c0cf 100644 --- a/contrib/pgxc_ctl/do_command.c +++ b/contrib/pgxc_ctl/do_command.c @@ -2680,8 +2680,8 @@ do_show_help(char *line) "add gtm_proxy name host port dir\n" "add coordinator master name host port pooler dir extra_conf extra_pghba\n" "add coordinator slave name host port pooler dir archDir\n" - "add datanode master name host port pooler dir xlogdir restore_datanode_name extra_conf extra_pghba\n" - "add datanode slave name host port pooler dir xlogdir archDir\n" + "add datanode master name host port pooler dir waldir restore_datanode_name extra_conf extra_pghba\n" + "add datanode slave name host port pooler dir waldir archDir\n" "\n" "Add the specified node to your postgres-xl cluster:\n" "For more details, please see the pgxc_ctl documentation\n" diff --git a/doc/src/sgml/pgxc_ctl-ref.sgml b/doc/src/sgml/pgxc_ctl-ref.sgml index 483a55911f..46b0439e60 100644 --- a/doc/src/sgml/pgxc_ctl-ref.sgml +++ b/doc/src/sgml/pgxc_ctl-ref.sgml @@ -1626,8 +1626,8 @@ PGXC$ prepare config minimal my_minimal_config.conf add gtm_proxy name host port dir add coordinator master name host port pooler dir< extraServerConf extraPgHbaConf add coordinator slave name host port pooler dir archDir - add datanode master name host port pooler dir xlogdir extraServerConf extraPgHbaConf - add datanode slave name host port pooler dir xlogdir archDir + add datanode master name host port pooler dir waldir extraServerConf extraPgHbaConf + add datanode slave name host port pooler dir waldir archDir Add the specified node to your Postgres-XL cluster. Each node needs a -- 2.30.2