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

Commit1812b4f

Browse files
committed
rename PickyAppend to RuntimeAppend
1 parent1610066 commit1812b4f

File tree

8 files changed

+107
-107
lines changed

8 files changed

+107
-107
lines changed

‎Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# contrib/pg_pathman/Makefile
22

33
MODULE_big = pg_pathman
4-
OBJS = init.o utils.opickyappend.o pg_pathman.o dsm_array.o\
4+
OBJS = init.o utils.oruntimeappend.o pg_pathman.o dsm_array.o\
55
rangeset.o pl_funcs.o worker.o hooks.o nodes_common.o$(WIN32RES)
66

77
EXTENSION = pg_pathman

‎hooks.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include"hooks.h"
1414
#include"utils.h"
1515
#include"pathman.h"
16-
#include"pickyappend.h"
16+
#include"runtimeappend.h"
1717

1818

1919
set_join_pathlist_hook_typeset_join_pathlist_next=NULL;
@@ -52,7 +52,7 @@ pathman_join_pathlist_hook(PlannerInfo *root,
5252
jointype=JOIN_INNER;
5353
}
5454

55-
if (jointype==JOIN_FULL|| !pg_pathman_enable_pickyappend)
55+
if (jointype==JOIN_FULL|| !pg_pathman_enable_runtimeappend)
5656
return;
5757

5858
if (innerrel->reloptkind!=RELOPT_BASEREL||
@@ -96,10 +96,10 @@ pathman_join_pathlist_hook(PlannerInfo *root,
9696
inner_required=bms_union(PATH_REQ_OUTER((Path*)cur_inner_path),
9797
bms_make_singleton(outerrel->relid));
9898

99-
inner=create_pickyappend_path(root,cur_inner_path,
100-
get_appendrel_parampathinfo(innerrel,
101-
inner_required),
102-
joinclauses,paramsel);
99+
inner=create_runtimeappend_path(root,cur_inner_path,
100+
get_appendrel_parampathinfo(innerrel,
101+
inner_required),
102+
joinclauses,paramsel);
103103

104104
initial_cost_nestloop(root,&workspace,jointype,
105105
outer,inner,
@@ -266,7 +266,7 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
266266
set_append_rel_pathlist(root,rel,rti,rte,pathkeyAsc,pathkeyDesc);
267267
set_append_rel_size(root,rel,rti,rte);
268268

269-
if (!pg_pathman_enable_pickyappend)
269+
if (!pg_pathman_enable_runtimeappend)
270270
return;
271271

272272
foreach (lc,rel->pathlist)
@@ -276,7 +276,7 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
276276
ParamPathInfo*ppi=get_appendrel_parampathinfo(rel,inner_required);
277277
Path*inner_path;
278278
ListCell*subpath_cell;
279-
List*picky_quals=NIL;
279+
List*runtime_quals=NIL;
280280

281281
if (!IsA(cur_path,AppendPath)||
282282
rel->has_eclass_joins||
@@ -302,30 +302,30 @@ pathman_rel_pathlist_hook(PlannerInfo *root, RelOptInfo *rel, Index rti, RangeTb
302302
/* Do not proceed if there's a rel containing quals without params */
303303
if (!clause_contains_params((Node*)quals))
304304
{
305-
picky_quals=NIL;/* skip this path */
305+
runtime_quals=NIL;/* skip this path */
306306
break;
307307
}
308308

309309
/* Replace child Vars with a parent rel's Var */
310310
quals= (List*)replace_child_vars_with_parent_var((Node*)quals,
311311
&repl_var_cxt);
312312

313-
/* Combine unique'picky'quals */
313+
/* Combine unique quals for RuntimeAppend */
314314
foreach (qual_cell,quals)
315-
picky_quals=list_append_unique(picky_quals,
316-
(Node*)lfirst(qual_cell));
315+
runtime_quals=list_append_unique(runtime_quals,
316+
(Node*)lfirst(qual_cell));
317317
}
318318

319319
/*
320-
* DismissPickyAppend if there
320+
* DismissRuntimeAppend if there
321321
* are no parameterized quals
322322
*/
323-
if (picky_quals==NIL)
323+
if (runtime_quals==NIL)
324324
continue;
325325

326-
inner_path=create_pickyappend_path(root,cur_path,
327-
ppi,picky_quals,
328-
paramsel);
326+
inner_path=create_runtimeappend_path(root,cur_path,
327+
ppi,runtime_quals,
328+
paramsel);
329329

330330
add_path(rel,inner_path);
331331
}

‎nodes_common.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include"postgres.h"
1111
#include"optimizer/paths.h"
1212
#include"nodes_common.h"
13-
#include"pickyappend.h"
13+
#include"runtimeappend.h"
1414

1515

1616

@@ -46,7 +46,7 @@ free_child_scan_common_array(ChildScanCommon *cur_plans, int n)
4646
}
4747

4848
staticvoid
49-
transform_plans_into_states(PickyAppendState*scan_state,
49+
transform_plans_into_states(RuntimeAppendState*scan_state,
5050
ChildScanCommon*selected_plans,intn,
5151
EState*estate)
5252
{
@@ -152,7 +152,7 @@ get_partition_oids(List *ranges, int *n, PartRelationInfo *prel)
152152
}
153153

154154
staticvoid
155-
pack_pickyappend_private(CustomScan*cscan,PickyAppendPath*path)
155+
pack_runtimeappend_private(CustomScan*cscan,RuntimeAppendPath*path)
156156
{
157157
ChildScanCommon*children=path->children;
158158
intnchildren=path->nchildren;
@@ -162,7 +162,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
162162

163163
for (i=0;i<nchildren;i++)
164164
{
165-
/* We've already filled 'custom_paths' increate_pickyappend_path */
165+
/* We've already filled 'custom_paths' increate_runtimeappend_path */
166166
custom_oids=lappend_oid(custom_oids,children[i]->relid);
167167
pfree(children[i]);
168168
}
@@ -174,7 +174,7 @@ pack_pickyappend_private(CustomScan *cscan, PickyAppendPath *path)
174174
}
175175

176176
staticvoid
177-
unpack_pickyappend_private(PickyAppendState*scan_state,CustomScan*cscan)
177+
unpack_runtimeappend_private(RuntimeAppendState*scan_state,CustomScan*cscan)
178178
{
179179
ListCell*oid_cell;
180180
ListCell*plan_cell;
@@ -216,19 +216,19 @@ Path *
216216
create_append_path_common(PlannerInfo*root,
217217
AppendPath*inner_append,
218218
ParamPathInfo*param_info,
219-
List*picky_clauses,
219+
List*runtime_clauses,
220220
CustomPathMethods*path_methods,
221221
doublesel)
222222
{
223-
RelOptInfo*innerrel=inner_append->path.parent;
224-
ListCell*lc;
225-
inti;
223+
RelOptInfo*innerrel=inner_append->path.parent;
224+
ListCell*lc;
225+
inti;
226226

227-
RangeTblEntry*inner_entry=root->simple_rte_array[innerrel->relid];
227+
RangeTblEntry*inner_entry=root->simple_rte_array[innerrel->relid];
228228

229-
PickyAppendPath*result;
229+
RuntimeAppendPath*result;
230230

231-
result=palloc0(sizeof(PickyAppendPath));
231+
result=palloc0(sizeof(RuntimeAppendPath));
232232
NodeSetTag(result,T_CustomPath);
233233

234234
result->cpath.path.pathtype=T_CustomScan;
@@ -247,7 +247,7 @@ create_append_path_common(PlannerInfo *root,
247247
result->cpath.path.total_cost=0.0;
248248

249249
/* Set 'partitioned column'-related clauses */
250-
result->cpath.custom_private=picky_clauses;
250+
result->cpath.custom_private=runtime_clauses;
251251
result->cpath.custom_paths=NIL;
252252

253253
Assert(inner_entry->relid!=0);
@@ -258,9 +258,9 @@ create_append_path_common(PlannerInfo *root,
258258
i=0;
259259
foreach (lc,inner_append->subpaths)
260260
{
261-
Path*path=lfirst(lc);
262-
Indexrelindex=path->parent->relid;
263-
ChildScanCommonchild=palloc(sizeof(ChildScanCommonData));
261+
Path*path=lfirst(lc);
262+
Indexrelindex=path->parent->relid;
263+
ChildScanCommonchild=palloc(sizeof(ChildScanCommonData));
264264

265265
result->cpath.path.startup_cost+=path->startup_cost;
266266
result->cpath.path.total_cost+=path->total_cost;
@@ -288,7 +288,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
288288
List*clauses,List*custom_plans,
289289
CustomScanMethods*scan_methods)
290290
{
291-
PickyAppendPath*gpath= (PickyAppendPath*)best_path;
291+
RuntimeAppendPath*gpath= (RuntimeAppendPath*)best_path;
292292
CustomScan*cscan;
293293

294294
cscan=makeNode(CustomScan);
@@ -302,7 +302,7 @@ create_append_plan_common(PlannerInfo *root, RelOptInfo *rel,
302302

303303
cscan->methods=scan_methods;
304304

305-
pack_pickyappend_private(cscan,gpath);
305+
pack_runtimeappend_private(cscan,gpath);
306306

307307
return&cscan->scan.plan;
308308
}
@@ -312,14 +312,14 @@ create_append_scan_state_common(CustomScan *node,
312312
CustomExecMethods*exec_methods,
313313
uint32size)
314314
{
315-
PickyAppendState*scan_state=palloc0(size);
315+
RuntimeAppendState*scan_state=palloc0(size);
316316

317317
NodeSetTag(scan_state,T_CustomScanState);
318318
scan_state->css.flags=node->flags;
319319
scan_state->css.methods=exec_methods;
320320
scan_state->custom_exprs=node->custom_exprs;
321321

322-
unpack_pickyappend_private(scan_state,node);
322+
unpack_runtimeappend_private(scan_state,node);
323323

324324
/* Fill in relation info using main table's relid */
325325
scan_state->prel=get_pathman_relation_info(scan_state->relid,NULL);
@@ -335,7 +335,7 @@ create_append_scan_state_common(CustomScan *node,
335335
void
336336
begin_append_common(CustomScanState*node,EState*estate,inteflags)
337337
{
338-
PickyAppendState*scan_state= (PickyAppendState*)node;
338+
RuntimeAppendState*scan_state= (RuntimeAppendState*)node;
339339
HTAB*plan_state_table;
340340
HASHCTL*plan_state_table_config=&scan_state->plan_state_table_config;
341341

@@ -356,7 +356,7 @@ begin_append_common(CustomScanState *node, EState *estate, int eflags)
356356
void
357357
end_append_common(CustomScanState*node)
358358
{
359-
PickyAppendState*scan_state= (PickyAppendState*)node;
359+
RuntimeAppendState*scan_state= (RuntimeAppendState*)node;
360360

361361
clear_plan_states(&scan_state->css);
362362
hash_destroy(scan_state->plan_state_table);
@@ -366,7 +366,7 @@ end_append_common(CustomScanState *node)
366366
void
367367
rescan_append_common(CustomScanState*node)
368368
{
369-
PickyAppendState*scan_state= (PickyAppendState*)node;
369+
RuntimeAppendState*scan_state= (RuntimeAppendState*)node;
370370
ExprContext*econtext=node->ss.ps.ps_ExprContext;
371371
PartRelationInfo*prel=scan_state->prel;
372372
List*ranges;

‎nodes_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ clear_plan_states(CustomScanState *scan_state)
5656
Path*create_append_path_common(PlannerInfo*root,
5757
AppendPath*inner_append,
5858
ParamPathInfo*param_info,
59-
List*picky_clauses,
59+
List*runtime_clauses,
6060
CustomPathMethods*path_methods,
6161
doublesel);
6262

‎pg_pathman.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include"catalog/pg_type.h"
4141
#include"foreign/fdwapi.h"
4242
#include"hooks.h"
43-
#include"pickyappend.h"
43+
#include"runtimeappend.h"
4444

4545
PG_MODULE_MAGIC;
4646

@@ -155,20 +155,20 @@ _PG_init(void)
155155
planner_hook_original=planner_hook;
156156
planner_hook=pathman_planner_hook;
157157

158-
pickyappend_path_methods.CustomName="PickyAppend";
159-
pickyappend_path_methods.PlanCustomPath=create_pickyappend_plan;
158+
runtimeappend_path_methods.CustomName="RuntimeAppend";
159+
runtimeappend_path_methods.PlanCustomPath=create_runtimeappend_plan;
160160

161-
pickyappend_plan_methods.CustomName="PickyAppend";
162-
pickyappend_plan_methods.CreateCustomScanState=pickyappend_create_scan_state;
161+
runtimeappend_plan_methods.CustomName="RuntimeAppend";
162+
runtimeappend_plan_methods.CreateCustomScanState=runtimeappend_create_scan_state;
163163

164-
pickyappend_exec_methods.CustomName="PickyAppend";
165-
pickyappend_exec_methods.BeginCustomScan=pickyappend_begin;
166-
pickyappend_exec_methods.ExecCustomScan=pickyappend_exec;
167-
pickyappend_exec_methods.EndCustomScan=pickyappend_end;
168-
pickyappend_exec_methods.ReScanCustomScan=pickyappend_rescan;
169-
pickyappend_exec_methods.MarkPosCustomScan=NULL;
170-
pickyappend_exec_methods.RestrPosCustomScan=NULL;
171-
pickyappend_exec_methods.ExplainCustomScan=pickyppend_explain;
164+
runtimeppend_exec_methods.CustomName="RuntimeAppend";
165+
runtimeppend_exec_methods.BeginCustomScan=runtimeappend_begin;
166+
runtimeppend_exec_methods.ExecCustomScan=runtimeappend_exec;
167+
runtimeppend_exec_methods.EndCustomScan=runtimeappend_end;
168+
runtimeppend_exec_methods.ReScanCustomScan=runtimeappend_rescan;
169+
runtimeppend_exec_methods.MarkPosCustomScan=NULL;
170+
runtimeppend_exec_methods.RestrPosCustomScan=NULL;
171+
runtimeppend_exec_methods.ExplainCustomScan=runtimeppend_explain;
172172

173173
DefineCustomBoolVariable("pg_pathman.enable",
174174
"Enables pg_pathman's optimizations during the planner stage",
@@ -181,10 +181,10 @@ _PG_init(void)
181181
NULL,
182182
NULL);
183183

184-
DefineCustomBoolVariable("pg_pathman.enable_pickyappend",
185-
"Enables the planner's use ofPickyAppend custom node.",
184+
DefineCustomBoolVariable("pg_pathman.enable_runtimeappend",
185+
"Enables the planner's use ofRuntimeAppend custom node.",
186186
NULL,
187-
&pg_pathman_enable_pickyappend,
187+
&pg_pathman_enable_runtimeappend,
188188
true,
189189
PGC_USERSET,
190190
0,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp