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

Commitb05ee92

Browse files
committed
add PickyAppend user GUC
1 parent081c4ee commitb05ee92

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

‎pg_pathman.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include"utils/date.h"
3434
#include"utils/typcache.h"
3535
#include"utils/lsyscache.h"
36+
#include"utils/guc.h"
3637
#include"access/heapam.h"
3738
#include"access/nbtree.h"
3839
#include"storage/ipc.h"
@@ -157,6 +158,17 @@ _PG_init(void)
157158
pickyappend_exec_methods.MarkPosCustomScan=NULL;
158159
pickyappend_exec_methods.RestrPosCustomScan=NULL;
159160
pickyappend_exec_methods.ExplainCustomScan=pickyppend_explain;
161+
162+
DefineCustomBoolVariable("pg_pathman.enable_pickyappend",
163+
"Enables the planner's use of PickyAppend custom node.",
164+
NULL,
165+
&pg_pathman_enable_pickyappend,
166+
true,
167+
PGC_USERSET,
168+
0,
169+
NULL,
170+
NULL,
171+
NULL);
160172
}
161173

162174
void

‎pickyappend.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
#include"optimizer/tlist.h"
1111
#include"optimizer/var.h"
1212

13+
14+
boolpg_pathman_enable_pickyappend= true;
15+
1316
set_join_pathlist_hook_typeset_join_pathlist_next=NULL;
1417

1518
CustomPathMethodspickyappend_path_methods;
@@ -293,7 +296,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
293296
set_join_pathlist_next(root,joinrel,outerrel,
294297
innerrel,jointype,extra);
295298

296-
if (jointype==JOIN_FULL)
299+
if (jointype==JOIN_FULL|| !pg_pathman_enable_pickyappend)
297300
return;
298301

299302
if (innerrel->reloptkind==RELOPT_BASEREL&&

‎pickyappend.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
#include"pathman.h"
88

9+
10+
externboolpg_pathman_enable_pickyappend;
11+
912
typedefstruct
1013
{
1114
Oidrelid;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp