Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
30948311
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
30948311
编写于
8月 03, 2016
作者:
W
Wang Hao
提交者:
GitHub
8月 03, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix gpperfmon bug that explain/analyze statement produce a wrong tsubmit in queries_now (#1017)
上级
32c0af4c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
12 addition
and
22 deletion
+12
-22
src/backend/commands/explain.c
src/backend/commands/explain.c
+12
-0
src/backend/tcop/pquery.c
src/backend/tcop/pquery.c
+0
-22
未找到文件。
src/backend/commands/explain.c
浏览文件 @
30948311
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
#include "commands/explain.h"
#include "commands/explain.h"
#include "commands/prepare.h"
#include "commands/prepare.h"
#include "commands/trigger.h"
#include "commands/trigger.h"
#include "commands/queue.h"
#include "executor/execUtils.h"
#include "executor/execUtils.h"
#include "executor/instrument.h"
#include "executor/instrument.h"
#include "nodes/pg_list.h"
#include "nodes/pg_list.h"
...
@@ -391,6 +392,17 @@ ExplainOnePlan(PlannedStmt *plannedstmt, ParamListInfo params,
...
@@ -391,6 +392,17 @@ ExplainOnePlan(PlannedStmt *plannedstmt, ParamListInfo params,
None_Receiver
,
params
,
None_Receiver
,
params
,
stmt
->
analyze
);
stmt
->
analyze
);
if
(
gp_enable_gpperfmon
&&
Gp_role
==
GP_ROLE_DISPATCH
)
{
Assert
(
queryString
);
gpmon_qlog_query_submit
(
queryDesc
->
gpmon_pkt
);
gpmon_qlog_query_text
(
queryDesc
->
gpmon_pkt
,
queryString
,
application_name
,
GetResqueueName
(
GetResQueueId
()),
GetResqueuePriority
(
GetResQueueId
()));
}
/* Initialize ExplainState structure. */
/* Initialize ExplainState structure. */
es
=
(
ExplainState
*
)
palloc0
(
sizeof
(
ExplainState
));
es
=
(
ExplainState
*
)
palloc0
(
sizeof
(
ExplainState
));
es
->
pstmt
=
queryDesc
->
plannedstmt
;
es
->
pstmt
=
queryDesc
->
plannedstmt
;
...
...
src/backend/tcop/pquery.c
浏览文件 @
30948311
...
@@ -1416,22 +1416,6 @@ PortalRunUtility(Portal portal, Node *utilityStmt, bool isTopLevel,
...
@@ -1416,22 +1416,6 @@ PortalRunUtility(Portal portal, Node *utilityStmt, bool isTopLevel,
ActiveSnapshot
=
CopySnapshot
(
GetTransactionSnapshot
());
ActiveSnapshot
=
CopySnapshot
(
GetTransactionSnapshot
());
else
else
ActiveSnapshot
=
NULL
;
ActiveSnapshot
=
NULL
;
gpmon_packet_t
*
gpmon_pkt
=
NULL
;
if
(
gp_enable_gpperfmon
&&
Gp_role
==
GP_ROLE_DISPATCH
)
{
gpmon_pkt
=
(
gpmon_packet_t
*
)
palloc0
(
sizeof
(
gpmon_packet_t
));
gpmon_qlog_packet_init
(
gpmon_pkt
);
/* set gpmon_pkt->u.qlog.key.ccnt to 0 in utility mode becasue the gp_command_count is changing */
gpmon_pkt
->
u
.
qlog
.
key
.
ccnt
=
0
;
gpmon_qlog_query_submit
(
gpmon_pkt
);
gpmon_qlog_query_text
(
gpmon_pkt
,
portal
->
sourceText
?
portal
->
sourceText
:
"(Source text for portal is not available)"
,
application_name
,
GetResqueueName
(
portal
->
queueId
),
GetResqueuePriority
(
portal
->
queueId
));
gpmon_qlog_query_start
(
gpmon_pkt
);
}
/* check if this utility statement need to be involved into resoure queue
/* check if this utility statement need to be involved into resoure queue
* mgmt */
* mgmt */
...
@@ -1450,12 +1434,6 @@ PortalRunUtility(Portal portal, Node *utilityStmt, bool isTopLevel,
...
@@ -1450,12 +1434,6 @@ PortalRunUtility(Portal portal, Node *utilityStmt, bool isTopLevel,
if
(
ActiveSnapshot
)
if
(
ActiveSnapshot
)
FreeSnapshot
(
ActiveSnapshot
);
FreeSnapshot
(
ActiveSnapshot
);
ActiveSnapshot
=
NULL
;
ActiveSnapshot
=
NULL
;
if
(
gp_enable_gpperfmon
&&
Gp_role
==
GP_ROLE_DISPATCH
)
{
gpmon_qlog_query_end
(
gpmon_pkt
);
pfree
(
gpmon_pkt
);
}
}
}
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录