提交 2b5720bf 编写于 作者: J Jimmy Yih 提交者: Xin Zhang

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 <jyih@pivotal.io>
Author: Marbin Tan <mtan@pivotal.io>
上级 ce4d96b6
......@@ -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'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册