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

Do deactiving and runaway detecting before ReadyForQuery()

This fixes issue #4022, so any OOM errors of current query
will not muddle following queries.
上级 07ee8008
......@@ -4889,6 +4889,13 @@ PostgresMain(int argc, char *argv[],
if (Gp_role == GP_ROLE_EXECUTE)
gp_command_count = 0;
/*
* Do deactiving and runaway detecting before ReadyForQuery(),
* so any OOM errors of current query will not muddle following
* queries
*/
IdleTracker_DeactivateProcess();
/*
* (1) If we've reached idle state, tell the frontend we're ready for
* a new query.
......@@ -4968,7 +4975,6 @@ PostgresMain(int argc, char *argv[],
elog(FATAL, "could not set timer for client wait timeout");
}
IdleTracker_DeactivateProcess();
firstchar = ReadCommand(&input_message);
IdleTracker_ActivateProcess();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册