From 2b5720bf55ecdc14e220ef1e876800c39b9e0b56 Mon Sep 17 00:00:00 2001 From: Jimmy Yih Date: Thu, 21 Dec 2017 16:58:59 -0800 Subject: [PATCH] Make gpstart work for walrep mirrors All that was needed was to make sure mirrors are not started with pg_ctl -w flag since the mirror is in recovery mode and will not respond to PQPing messages. Author: Jimmy Yih Author: Marbin Tan --- gpMgmt/bin/gppylib/commands/gp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpMgmt/bin/gppylib/commands/gp.py b/gpMgmt/bin/gppylib/commands/gp.py index a7ac101745..5224f17b5b 100644 --- a/gpMgmt/bin/gppylib/commands/gp.py +++ b/gpMgmt/bin/gppylib/commands/gp.py @@ -372,6 +372,7 @@ class SegmentStart(Command): content = gpdb.getSegmentContentId() port = gpdb.getSegmentPort() datadir = gpdb.getSegmentDataDirectory() + role = gpdb.getSegmentRole() # build backend options b = PgCtlBackendOptions(port, dbid, numContentsInCluster) @@ -379,6 +380,10 @@ class SegmentStart(Command): b.set_utility(utilityMode) b.set_special(specialMode) + # mirror will be in recovery mode so pg_ctl -w flag won't work + if role == gparray.ROLE_MIRROR: + noWait = True + # build pg_ctl command c = PgCtlStartArgs(datadir, b, era, wrapper, wrapper_args, not noWait, timeout) self.cmdStr = str(c) + ' 2>&1' -- GitLab