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

Commitc1b4436

Browse files
committed
PGPRO-10866: Use updated cost_sort() and transformRelOptions() interfaces.
Caused by: - e22253467942fdb100087787c3e1e3a8620c54b2 (PostgreSQL) Treat number of disabled nodes in a path as a separate cost metric. - 1e35951e71d37ab6716fa55ba399fbe6df4a7417 (PostgreSQL) Turn a few 'validnsps' static variables into locals -fc50c38 (pg_pathman) copy static functions needed for MergeAppend, save intermediate results Tags: pg_pathman
1 parent3c36220 commitc1b4436

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

‎src/include/compat/pg_compat.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,4 +1245,28 @@ voidset_append_rel_size_compat(PlannerInfo *root, RelOptInfo *rel, Index rti);
12451245
#defineEvalPlanQualInit_compat(epqstate,parentestate,subplan,auxrowmarks,epqParam) EvalPlanQualInit(epqstate, parentestate, subplan, auxrowmarks, epqParam)
12461246
#endif
12471247

1248+
/*
1249+
* cost_sort()
1250+
* In >=18 an arg was added
1251+
*/
1252+
#ifPG_VERSION_NUM >=180000
1253+
#definecost_sort_compat(path,root,pathkeys,disabled_nodes,input_cost,tuples,width,comparison_cost,sort_mem,limit_tuples) \
1254+
cost_sort((path), (root), (pathkeys), (disabled_nodes), (input_cost), (tuples), (width), (comparison_cost), (sort_mem), (limit_tuples))
1255+
#else
1256+
#definecost_sort_compat(path,root,pathkeys,disabled_nodes,input_cost,tuples,width,comparison_cost,sort_mem,limit_tuples) \
1257+
cost_sort((path), (root), (pathkeys), (input_cost), (tuples), (width), (comparison_cost), (sort_mem), (limit_tuples))
1258+
#endif
1259+
1260+
/*
1261+
* transformRelOptions()
1262+
* In >=18 the type of an arg was changed
1263+
*/
1264+
#ifPG_VERSION_NUM >=180000
1265+
#definetransformRelOptions_compat(oldOptions,defList,namspace,validnsps,acceptOidsOff,isReset) \
1266+
transformRelOptions((oldOptions), (defList), (namspace), (const char *const *)(validnsps), (acceptOidsOff), (isReset))
1267+
#else
1268+
#definetransformRelOptions_compat(oldOptions,defList,namspace,validnsps,acceptOidsOff,isReset) \
1269+
transformRelOptions((oldOptions), (defList), (namspace), (validnsps), (acceptOidsOff), (isReset))
1270+
#endif
1271+
12481272
#endif/* PG_COMPAT_H */

‎src/partition_creation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,7 @@ create_table_using_stmt(CreateStmt *create_stmt, Oid relowner)
958958
CommandCounterIncrement();
959959

960960
/* Parse and validate reloptions for the toast table */
961-
toast_options=transformRelOptions((Datum)0,create_stmt->options,
961+
toast_options=transformRelOptions_compat((Datum)0,create_stmt->options,
962962
"toast",validnsps, true, false);
963963

964964
/* Parse options for a new toast table */

‎src/runtime_merge_append.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ make_sort(PlannerInfo *root, Plan *lefttree, int numCols,
533533
Pathsort_path;/* dummy for result of cost_sort */
534534

535535
copy_plan_costsize(plan,lefttree);/* only care about copying size */
536-
cost_sort(&sort_path,root,NIL,
536+
cost_sort_compat(&sort_path,root,NIL,0,
537537
lefttree->total_cost,
538538
lefttree->plan_rows,
539539
lefttree->plan_width,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp