summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavan Deolasee2014-09-04 11:52:25 +0000
committerPavan Deolasee2014-09-04 12:03:39 +0000
commit8f3ef7b87cfcdfef73616a31e5103b4680f7ca7c (patch)
tree38cf66d58d4824c20e8433ffd463a0719e0d2181
parentfe5a20dfcb48e8309043eec78a593ba0ee28b953 (diff)
Do not try to unregister a node from GTM.
XL does not regsiter datanode/coordinators with GTM. So we don't require the corresponding unregistration code in pgxc_ctl
-rw-r--r--contrib/pgxc_ctl/coord_cmd.c4
-rw-r--r--contrib/pgxc_ctl/datanode_cmd.c2
-rw-r--r--contrib/pgxc_ctl/do_command.c2
3 files changed, 7 insertions, 1 deletions
diff --git a/contrib/pgxc_ctl/coord_cmd.c b/contrib/pgxc_ctl/coord_cmd.c
index 1007a379c2..28c8abc654 100644
--- a/contrib/pgxc_ctl/coord_cmd.c
+++ b/contrib/pgxc_ctl/coord_cmd.c
@@ -2027,9 +2027,11 @@ static int failover_oneCoordinator(int coordIdx)
else
elog(NOTICE, "Filover coordinator %s using GTM itself\n",
aval(VAR_coordNames)[coordIdx]);
-
+
+#ifndef XCP
/* Unregister the coordinator from GTM */
unregister_coordinator(aval(VAR_coordNames)[coordIdx]);
+#endif
/* Promote the slave */
rc_local = doImmediate(aval(VAR_coordSlaveServers)[coordIdx], NULL,
diff --git a/contrib/pgxc_ctl/datanode_cmd.c b/contrib/pgxc_ctl/datanode_cmd.c
index ae296466b0..e4b3be2afc 100644
--- a/contrib/pgxc_ctl/datanode_cmd.c
+++ b/contrib/pgxc_ctl/datanode_cmd.c
@@ -736,8 +736,10 @@ static int failover_oneDatanode(int datanodeIdx)
elog(NOTICE, "Filover database %s using GTM itself\n",
aval(VAR_datanodeNames)[datanodeIdx]);
+#ifndef XCP
/* Unregister the datanode */
unregister_datanode(aval(VAR_datanodeNames)[datanodeIdx]);
+#endif
/* Promote the slave */
rc_local = doImmediate(aval(VAR_datanodeSlaveServers)[datanodeIdx], NULL,
diff --git a/contrib/pgxc_ctl/do_command.c b/contrib/pgxc_ctl/do_command.c
index 33f82b038c..21b2c3426f 100644
--- a/contrib/pgxc_ctl/do_command.c
+++ b/contrib/pgxc_ctl/do_command.c
@@ -2577,6 +2577,7 @@ int do_singleLine(char *buf, char *wkline)
Free(cmdLine);
return 0;
}
+#ifndef XCP
else if (TestToken("unregister"))
{
/*
@@ -2585,6 +2586,7 @@ int do_singleLine(char *buf, char *wkline)
unregisterFromGtm(line);
return 0;
}
+#endif
else if (TestToken("test"))
{
do_test(line);