提交 ce481261 编写于 作者: P Pengzhou Tang 提交者: Tang Pengzhou

Fix issue that GPDB auxiliary backend cannot start in QE

background worker is not scheduled until distributed transactions
are recovered if it needs to start at BgWorkerStart_RecoveryFinished
or BgWorkerStart_ConsistentState because it's not safe to do a read
or write if DTX is not recovered. GPDB is designed to do this check
in master only, however Gp_role == GP_ROLE_DISPATCH is not a
sufficient check for master.

Spotted by Wang Hao <haowang@pivotal.io>
上级 be00c3d2
...@@ -6236,7 +6236,7 @@ bgworker_should_start_mpp(BackgroundWorker *worker) ...@@ -6236,7 +6236,7 @@ bgworker_should_start_mpp(BackgroundWorker *worker)
* or BgWorkerStart_ConsistentState because it's not safe to do a read * or BgWorkerStart_ConsistentState because it's not safe to do a read
* or write if DTX is not recovered. * or write if DTX is not recovered.
*/ */
if (Gp_role == GP_ROLE_DISPATCH) if (IsUnderMasterDispatchMode())
{ {
if (!*shmDtmStarted && if (!*shmDtmStarted &&
(start_time == BgWorkerStart_ConsistentState || (start_time == BgWorkerStart_ConsistentState ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册