Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f5645c

Browse files
author
Maksim Milyutin
committed
Hide executor hooks inside instrument branch to eliminate overhead in executor
1 parente9b546c commit4f5645c

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

‎executor_hooks.patch

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/backend/executor/execProcnode.c b/src/backend/executor/execProcnode.c
2-
index 03c2feb..b8675d2 100644
2+
index 03c2feb..a33e645c 100644
33
--- a/src/backend/executor/execProcnode.c
44
+++ b/src/backend/executor/execProcnode.c
55
@@ -115,7 +115,6 @@
@@ -20,22 +20,29 @@ index 03c2feb..b8675d2 100644
2020

2121
/* ----------------------------------------------------------------
2222
*ExecProcNode
23-
@@ -373,6 +375,9 @@ ExecProcNode(PlanState *node)
24-
if (node->chgParam != NULL) /* something changed */
23+
@@ -374,7 +376,12 @@ ExecProcNode(PlanState *node)
2524
ExecReScan(node);/* let ReScan handle this */
2625

27-
+if (preExecProcNode_hook)
28-
+preExecProcNode_hook(node);
29-
+
3026
if (node->instrument)
27+
+{
28+
+if (preExecProcNode_hook)
29+
+preExecProcNode_hook(node);
30+
+
3131
InstrStartNode(node->instrument);
32+
+}
33+
34+
switch (nodeTag(node))
35+
{
36+
@@ -527,8 +534,13 @@ ExecProcNode(PlanState *node)
37+
}
3238

33-
@@ -529,6 +534,9 @@ ExecProcNode(PlanState *node)
3439
if (node->instrument)
40+
+{
3541
InstrStopNode(node->instrument, TupIsNull(result) ? 0.0 : 1.0);
3642

37-
+if (postExecProcNode_hook)
38-
+postExecProcNode_hook(node, result);
43+
+if (postExecProcNode_hook)
44+
+postExecProcNode_hook(node, result);
45+
+}
3946
+
4047
return result;
4148
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp