1
1
diff --git a/contrib/Makefile b/contrib/Makefile
2
- index bbf220407b..8225105893 100644
2
+ index abd780f2774..601892ef54a 100644
3
3
--- a/contrib/Makefile
4
4
+++ b/contrib/Makefile
5
5
@@ -6,6 +6,7 @@ include $(top_builddir)/src/Makefile.global
6
6
7
7
SUBDIRS = \
8
- adminpack \
9
- + aqo \
10
8
amcheck \
9
+ + aqo \
11
10
auth_delay \
12
11
auto_explain \
12
+ basic_archive \
13
13
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
14
- index 35c23bd27d..9dee2cee50 100644
14
+ index 94511a5a024..81b04bf9eb9 100644
15
15
--- a/src/backend/commands/explain.c
16
16
+++ b/src/backend/commands/explain.c
17
17
@@ -24,6 +24,7 @@
@@ -33,9 +33,9 @@ index 35c23bd27d..9dee2cee50 100644
33
33
+ ExplainOneNode_hook_type ExplainOneNode_hook = NULL;
34
34
+
35
35
36
- /* OR-able flags for ExplainXMLTag() */
37
- #define X_OPENING 0
38
- @@ -660 ,6 +667 ,10 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
36
+ /* Instrumentation data for SERIALIZE option */
37
+ typedef struct SerializeMetrics
38
+ @@ -795 ,6 +802 ,10 @@ ExplainOnePlan(PlannedStmt *plannedstmt, IntoClause *into, ExplainState *es,
39
39
ExplainPropertyFloat("Execution Time", "ms", 1000.0 * totaltime, 3,
40
40
es);
41
41
@@ -46,7 +46,7 @@ index 35c23bd27d..9dee2cee50 100644
46
46
ExplainCloseGroup("Query", NULL, true, es);
47
47
}
48
48
49
- @@ -1683 ,6 +1694 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
49
+ @@ -1885 ,6 +1896 ,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
50
50
}
51
51
}
52
52
@@ -57,10 +57,10 @@ index 35c23bd27d..9dee2cee50 100644
57
57
if (es->format == EXPLAIN_FORMAT_TEXT)
58
58
appendStringInfoChar(es->str, '\n');
59
59
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
60
- index 7918bb6f0d..36099866bb 100644
60
+ index ee23ed7835d..4ca51d39d1c 100644
61
61
--- a/src/backend/optimizer/path/costsize.c
62
62
+++ b/src/backend/optimizer/path/costsize.c
63
- @@ -99 ,6 +99 ,11 @@
63
+ @@ -98 ,6 +98 ,11 @@
64
64
#include "utils/spccache.h"
65
65
#include "utils/tuplesort.h"
66
66
@@ -72,15 +72,15 @@ index 7918bb6f0d..36099866bb 100644
72
72
73
73
#define LOG2(x) (log(x) / 0.693147180559945)
74
74
75
- @@ -191,7 +196,6 @@ static Cost append_nonpartial_cost(List *subpaths, int numpaths,
76
- static void set_rel_width (PlannerInfo *root, RelOptInfo *rel );
75
+ @@ -191,7 +196,6 @@ static void set_rel_width(PlannerInfo *root, RelOptInfo *rel);
76
+ static int32 get_expr_width (PlannerInfo *root, const Node *expr );
77
77
static double relation_byte_size(double tuples, int width);
78
78
static double page_size(double tuples, int width);
79
79
- static double get_parallel_divisor(Path *path);
80
80
81
81
82
82
/*
83
- @@ -4976 ,6 +4980 ,58 @@ approx_tuple_count(PlannerInfo *root, JoinPath *path, List *quals)
83
+ @@ -5222 ,6 +5226 ,58 @@ approx_tuple_count(PlannerInfo *root, JoinPath *path, List *quals)
84
84
}
85
85
86
86
@@ -139,7 +139,7 @@ index 7918bb6f0d..36099866bb 100644
139
139
/*
140
140
* set_baserel_size_estimates
141
141
* Set the size estimates for the given base relation.
142
- @@ -4992 ,19 +5048 ,10 @@ approx_tuple_count(PlannerInfo *root, JoinPath *path, List *quals)
142
+ @@ -5238 ,19 +5294 ,10 @@ approx_tuple_count(PlannerInfo *root, JoinPath *path, List *quals)
143
143
void
144
144
set_baserel_size_estimates(PlannerInfo *root, RelOptInfo *rel)
145
145
{
@@ -160,7 +160,7 @@ index 7918bb6f0d..36099866bb 100644
160
160
161
161
cost_qual_eval(&rel->baserestrictcost, rel->baserestrictinfo, root);
162
162
163
- @@ -5015 ,13 +5062 ,33 @@ set_baserel_size_estimates(PlannerInfo *root, RelOptInfo *rel)
163
+ @@ -5261 ,13 +5308 ,33 @@ set_baserel_size_estimates(PlannerInfo *root, RelOptInfo *rel)
164
164
* get_parameterized_baserel_size
165
165
* Make a size estimate for a parameterized scan of a base relation.
166
166
*
@@ -196,7 +196,7 @@ index 7918bb6f0d..36099866bb 100644
196
196
{
197
197
List *allclauses;
198
198
double nrows;
199
- @@ -5050 ,6 +5117 ,36 @@ get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel,
199
+ @@ -5296 ,6 +5363 ,36 @@ get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel,
200
200
* set_joinrel_size_estimates
201
201
* Set the size estimates for the given join relation.
202
202
*
@@ -233,7 +233,7 @@ index 7918bb6f0d..36099866bb 100644
233
233
* The rel's targetlist must have been constructed already, and a
234
234
* restriction clause list that matches the given component rels must
235
235
* be provided.
236
- @@ -5069 ,11 +5166 ,11 @@ get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel,
236
+ @@ -5315 ,11 +5412 ,11 @@ get_parameterized_baserel_size(PlannerInfo *root, RelOptInfo *rel,
237
237
* build_joinrel_tlist, and baserestrictcost is not used for join rels.
238
238
*/
239
239
void
@@ -250,7 +250,7 @@ index 7918bb6f0d..36099866bb 100644
250
250
{
251
251
rel->rows = calc_joinrel_size_estimate(root,
252
252
rel,
253
- @@ -5089 ,6 +5186 ,35 @@ set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
253
+ @@ -5335 ,6 +5432 ,35 @@ set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
254
254
* get_parameterized_joinrel_size
255
255
* Make a size estimate for a parameterized scan of a join relation.
256
256
*
@@ -286,7 +286,7 @@ index 7918bb6f0d..36099866bb 100644
286
286
* 'rel' is the joinrel under consideration.
287
287
* 'outer_path', 'inner_path' are (probably also parameterized) Paths that
288
288
* produce the relations being joined.
289
- @@ -5101 ,11 +5227 ,11 @@ set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
289
+ @@ -5347 ,11 +5473 ,11 @@ set_joinrel_size_estimates(PlannerInfo *root, RelOptInfo *rel,
290
290
* set_joinrel_size_estimates must have been applied already.
291
291
*/
292
292
double
@@ -303,7 +303,7 @@ index 7918bb6f0d..36099866bb 100644
303
303
{
304
304
double nrows;
305
305
306
- @@ -5820 ,7 +5946 ,7 @@ set_foreign_size_estimates(PlannerInfo *root, RelOptInfo *rel)
306
+ @@ -6066 ,7 +6192 ,7 @@ set_foreign_size_estimates(PlannerInfo *root, RelOptInfo *rel)
307
307
/* Should only be applied to base relations */
308
308
Assert(rel->relid > 0);
309
309
@@ -312,7 +312,7 @@ index 7918bb6f0d..36099866bb 100644
312
312
313
313
cost_qual_eval(&rel->baserestrictcost, rel->baserestrictinfo, root);
314
314
315
- @@ -6107 ,7 +6233 ,7 @@ page_size(double tuples, int width)
315
+ @@ -6359 ,7 +6485 ,7 @@ page_size(double tuples, int width)
316
316
* Estimate the fraction of the work that each worker will do given the
317
317
* number of workers budgeted for the path.
318
318
*/
@@ -322,18 +322,18 @@ index 7918bb6f0d..36099866bb 100644
322
322
{
323
323
double parallel_divisor = path->parallel_workers;
324
324
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c
325
- index 1b11852814..9629876f9f 100644
325
+ index 6b64c4a362d..4e44babc0a2 100644
326
326
--- a/src/backend/optimizer/plan/createplan.c
327
327
+++ b/src/backend/optimizer/plan/createplan.c
328
- @@ -70 ,6 +70 ,7 @@
328
+ @@ -71 ,6 +71 ,7 @@
329
329
#define CP_LABEL_TLIST 0x0004 /* tlist must contain sortgrouprefs */
330
330
#define CP_IGNORE_TLIST 0x0008 /* caller will replace tlist */
331
331
332
332
+ create_plan_hook_type create_plan_hook = NULL;
333
333
334
334
static Plan *create_plan_recurse(PlannerInfo *root, Path *best_path,
335
335
int flags);
336
- @@ -546 ,6 +547 ,10 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags)
336
+ @@ -548 ,6 +549 ,10 @@ create_plan_recurse(PlannerInfo *root, Path *best_path, int flags)
337
337
break;
338
338
}
339
339
@@ -344,7 +344,7 @@ index 1b11852814..9629876f9f 100644
344
344
return plan;
345
345
}
346
346
347
- @@ -5379 ,6 +5384 ,7 @@ copy_generic_path_info(Plan *dest, Path *src)
347
+ @@ -5414 ,6 +5419 ,7 @@ copy_generic_path_info(Plan *dest, Path *src)
348
348
dest->plan_width = src->pathtarget->width;
349
349
dest->parallel_aware = src->parallel_aware;
350
350
dest->parallel_safe = src->parallel_safe;
@@ -353,10 +353,10 @@ index 1b11852814..9629876f9f 100644
353
353
354
354
/*
355
355
diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c
356
- index db5ff6fdca..f2ace8d1be 100644
356
+ index 032818423f6..a5c7e71b724 100644
357
357
--- a/src/backend/optimizer/plan/planner.c
358
358
+++ b/src/backend/optimizer/plan/planner.c
359
- @@ -145 ,7 +145 ,8 @@ static List *extract_rollup_sets(List *groupingSets);
359
+ @@ -142 ,7 +142 ,8 @@ static List *extract_rollup_sets(List *groupingSets);
360
360
static List *reorder_grouping_sets(List *groupingSets, List *sortclause);
361
361
static void standard_qp_callback(PlannerInfo *root, void *extra);
362
362
static double get_number_of_groups(PlannerInfo *root,
@@ -366,7 +366,7 @@ index db5ff6fdca..f2ace8d1be 100644
366
366
grouping_sets_data *gd,
367
367
List *target_list);
368
368
static RelOptInfo *create_grouping_paths(PlannerInfo *root,
369
- @@ -3554 ,7 +3555 ,8 @@ standard_qp_callback(PlannerInfo *root, void *extra)
369
+ @@ -3531 ,7 +3532 ,8 @@ standard_qp_callback(PlannerInfo *root, void *extra)
370
370
*/
371
371
static double
372
372
get_number_of_groups(PlannerInfo *root,
@@ -376,7 +376,7 @@ index db5ff6fdca..f2ace8d1be 100644
376
376
grouping_sets_data *gd,
377
377
List *target_list)
378
378
{
379
- @@ -3591 ,7 +3593 ,7 @@ get_number_of_groups(PlannerInfo *root,
379
+ @@ -3568 ,7 +3570 ,7 @@ get_number_of_groups(PlannerInfo *root,
380
380
GroupingSetData *gs = lfirst_node(GroupingSetData, lc3);
381
381
double numGroups = estimate_num_groups(root,
382
382
groupExprs,
@@ -385,7 +385,7 @@ index db5ff6fdca..f2ace8d1be 100644
385
385
&gset,
386
386
NULL);
387
387
388
- @@ -3617 ,7 +3619 ,7 @@ get_number_of_groups(PlannerInfo *root,
388
+ @@ -3594 ,7 +3596 ,7 @@ get_number_of_groups(PlannerInfo *root,
389
389
GroupingSetData *gs = lfirst_node(GroupingSetData, lc2);
390
390
double numGroups = estimate_num_groups(root,
391
391
groupExprs,
@@ -394,7 +394,7 @@ index db5ff6fdca..f2ace8d1be 100644
394
394
&gset,
395
395
NULL);
396
396
397
- @@ -3634 ,8 +3636 ,8 @@ get_number_of_groups(PlannerInfo *root,
397
+ @@ -3611 ,8 +3613 ,8 @@ get_number_of_groups(PlannerInfo *root,
398
398
groupExprs = get_sortgrouplist_exprs(root->processed_groupClause,
399
399
target_list);
400
400
@@ -405,7 +405,7 @@ index db5ff6fdca..f2ace8d1be 100644
405
405
}
406
406
}
407
407
else if (parse->groupingSets)
408
- @@ -4025 ,7 +4027 ,8 @@ create_ordinary_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel,
408
+ @@ -4002 ,7 +4004 ,8 @@ create_ordinary_grouping_paths(PlannerInfo *root, RelOptInfo *input_rel,
409
409
* Estimate number of groups.
410
410
*/
411
411
dNumGroups = get_number_of_groups(root,
@@ -415,7 +415,7 @@ index db5ff6fdca..f2ace8d1be 100644
415
415
gd,
416
416
extra->targetList);
417
417
418
- @@ -7127 ,13 +7130 ,15 @@ create_partial_grouping_paths(PlannerInfo *root,
418
+ @@ -7207 ,13 +7210 ,15 @@ create_partial_grouping_paths(PlannerInfo *root,
419
419
if (cheapest_total_path != NULL)
420
420
dNumPartialGroups =
421
421
get_number_of_groups(root,
@@ -434,50 +434,50 @@ index db5ff6fdca..f2ace8d1be 100644
434
434
extra->targetList);
435
435
436
436
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
437
- index ad84cc43e1..8e1e436caf 100644
437
+ index e05b21c884e..5805136b70f 100644
438
438
--- a/src/backend/optimizer/util/relnode.c
439
439
+++ b/src/backend/optimizer/util/relnode.c
440
- @@ -272 ,6 +272 ,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent)
440
+ @@ -286 ,6 +286 ,7 @@ build_simple_rel(PlannerInfo *root, int relid, RelOptInfo *parent)
441
441
rel->all_partrels = NULL;
442
442
rel->partexprs = NULL;
443
443
rel->nullable_partexprs = NULL;
444
444
+ rel->ext_nodes = NULL;
445
445
446
446
/*
447
447
* Pass assorted information down the inheritance hierarchy.
448
- @@ -402 ,7 +403 ,6 @@ find_base_rel(PlannerInfo *root, int relid)
448
+ @@ -422 ,7 +423 ,6 @@ find_base_rel(PlannerInfo *root, int relid)
449
449
if (rel)
450
450
return rel;
451
451
}
452
452
-
453
453
elog(ERROR, "no relation entry for relid %d", relid);
454
454
455
455
return NULL; /* keep compiler quiet */
456
- @@ -732 ,6 +732 ,7 @@ build_join_rel(PlannerInfo *root,
456
+ @@ -768 ,6 +768 ,7 @@ build_join_rel(PlannerInfo *root,
457
457
joinrel->all_partrels = NULL;
458
458
joinrel->partexprs = NULL;
459
459
joinrel->nullable_partexprs = NULL;
460
460
+ joinrel->ext_nodes = NULL;
461
461
462
462
/* Compute information relevant to the foreign relations. */
463
463
set_foreign_rel_properties(joinrel, outer_rel, inner_rel);
464
- @@ -917 ,6 +918 ,7 @@ build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel,
464
+ @@ -962 ,6 +963 ,7 @@ build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel,
465
465
joinrel->all_partrels = NULL;
466
466
joinrel->partexprs = NULL;
467
467
joinrel->nullable_partexprs = NULL;
468
468
+ joinrel->ext_nodes = NULL;
469
469
470
470
/* Compute information relevant to foreign relations. */
471
471
set_foreign_rel_properties(joinrel, outer_rel, inner_rel);
472
- @@ -1467 ,6 +1469 ,7 @@ find_childrel_parents(PlannerInfo *root, RelOptInfo *rel)
472
+ @@ -1542 ,6 +1544 ,7 @@ find_childrel_parents(PlannerInfo *root, RelOptInfo *rel)
473
473
}
474
474
475
475
476
476
+ set_parampathinfo_postinit_hook_type parampathinfo_postinit_hook = NULL;
477
477
/*
478
478
* get_baserel_parampathinfo
479
479
* Get the ParamPathInfo for a parameterized path for a base relation,
480
- @@ -1546 ,6 +1549 ,10 @@ get_baserel_parampathinfo(PlannerInfo *root, RelOptInfo *baserel,
480
+ @@ -1634 ,6 +1637 ,10 @@ get_baserel_parampathinfo(PlannerInfo *root, RelOptInfo *baserel,
481
481
ppi->ppi_rows = rows;
482
482
ppi->ppi_clauses = pclauses;
483
483
ppi->ppi_serials = pserials;
@@ -488,7 +488,7 @@ index ad84cc43e1..8e1e436caf 100644
488
488
baserel->ppilist = lappend(baserel->ppilist, ppi);
489
489
490
490
return ppi;
491
- @@ -1799 ,6 +1806 ,10 @@ get_appendrel_parampathinfo(RelOptInfo *appendrel, Relids required_outer)
491
+ @@ -1888 ,6 +1895 ,10 @@ get_appendrel_parampathinfo(RelOptInfo *appendrel, Relids required_outer)
492
492
ppi->ppi_rows = 0;
493
493
ppi->ppi_clauses = NIL;
494
494
ppi->ppi_serials = NULL;
@@ -500,18 +500,18 @@ index ad84cc43e1..8e1e436caf 100644
500
500
501
501
return ppi;
502
502
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
503
- index fe37e65af0..0e5299078b 100644
503
+ index 5f5d7959d8e..20f63aae589 100644
504
504
--- a/src/backend/utils/adt/selfuncs.c
505
505
+++ b/src/backend/utils/adt/selfuncs.c
506
- @@ -145 ,6 +145 ,7 @@
506
+ @@ -146 ,6 +146 ,7 @@
507
507
/* Hooks for plugins to get control when we ask for stats */
508
508
get_relation_stats_hook_type get_relation_stats_hook = NULL;
509
509
get_index_stats_hook_type get_index_stats_hook = NULL;
510
510
+ estimate_num_groups_hook_type estimate_num_groups_hook = NULL;
511
511
512
512
static double eqsel_internal(PG_FUNCTION_ARGS, bool negate);
513
513
static double eqjoinsel_inner(Oid opfuncoid, Oid collation,
514
- @@ -3311 ,6 +3312 ,20 @@ add_unique_group_var(PlannerInfo *root, List *varinfos,
514
+ @@ -3341 ,6 +3342 ,20 @@ add_unique_group_var(PlannerInfo *root, List *varinfos,
515
515
return varinfos;
516
516
}
517
517
@@ -533,10 +533,10 @@ index fe37e65af0..0e5299078b 100644
533
533
* estimate_num_groups - Estimate number of groups in a grouped query
534
534
*
535
535
diff --git a/src/include/commands/explain.h b/src/include/commands/explain.h
536
- index 7c1071ddd1..72e954dd3e 100644
536
+ index 9b8b351d9a2..f49233826af 100644
537
537
--- a/src/include/commands/explain.h
538
538
+++ b/src/include/commands/explain.h
539
- @@ -75 ,6 +75 ,18 @@ extern PGDLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook;
539
+ @@ -85 ,6 +85 ,18 @@ extern PGDLLIMPORT ExplainOneQuery_hook_type ExplainOneQuery_hook;
540
540
typedef const char *(*explain_get_index_name_hook_type) (Oid indexId);
541
541
extern PGDLLIMPORT explain_get_index_name_hook_type explain_get_index_name_hook;
542
542
@@ -556,10 +556,10 @@ index 7c1071ddd1..72e954dd3e 100644
556
556
extern void ExplainQuery(ParseState *pstate, ExplainStmt *stmt,
557
557
ParamListInfo params, DestReceiver *dest);
558
558
diff --git a/src/include/nodes/pathnodes.h b/src/include/nodes/pathnodes.h
559
- index 62d9460258..a946d05e60 100644
559
+ index 14ef296ab72..b1316b8f791 100644
560
560
--- a/src/include/nodes/pathnodes.h
561
561
+++ b/src/include/nodes/pathnodes.h
562
- @@ -1038 ,6 +1038 ,16 @@ typedef struct RelOptInfo
562
+ @@ -1039 ,6 +1039 ,16 @@ typedef struct RelOptInfo
563
563
List **partexprs pg_node_attr(read_write_ignore);
564
564
/* Nullable partition key expressions */
565
565
List **nullable_partexprs pg_node_attr(read_write_ignore);
@@ -576,7 +576,7 @@ index 62d9460258..a946d05e60 100644
576
576
} RelOptInfo;
577
577
578
578
/*
579
- @@ -1558 ,6 +1568 ,10 @@ typedef struct ParamPathInfo
579
+ @@ -1569 ,6 +1579 ,10 @@ typedef struct ParamPathInfo
580
580
Cardinality ppi_rows; /* estimated number of result tuples */
581
581
List *ppi_clauses; /* join clauses available from outer rels */
582
582
Bitmapset *ppi_serials; /* set of rinfo_serial for enforced quals */
@@ -588,10 +588,10 @@ index 62d9460258..a946d05e60 100644
588
588
589
589
590
590
diff --git a/src/include/nodes/plannodes.h b/src/include/nodes/plannodes.h
591
- index 4781a9c632..03f8216664 100644
591
+ index 1aeeaec95e1..308f38214a3 100644
592
592
--- a/src/include/nodes/plannodes.h
593
593
+++ b/src/include/nodes/plannodes.h
594
- @@ -173 ,6 +173 ,9 @@ typedef struct Plan
594
+ @@ -169 ,6 +169 ,9 @@ typedef struct Plan
595
595
*/
596
596
Bitmapset *extParam;
597
597
Bitmapset *allParam;
@@ -602,7 +602,7 @@ index 4781a9c632..03f8216664 100644
602
602
603
603
/* ----------------
604
604
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
605
- index 6cf49705d3..6a96baf130 100644
605
+ index b1c51a4e70f..1cb601e3b27 100644
606
606
--- a/src/include/optimizer/cost.h
607
607
+++ b/src/include/optimizer/cost.h
608
608
@@ -41,6 +41,37 @@ typedef enum
@@ -678,15 +678,15 @@ index 6cf49705d3..6a96baf130 100644
678
678
extern void set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel);
679
679
extern void set_function_size_estimates(PlannerInfo *root, RelOptInfo *rel);
680
680
extern void set_values_size_estimates(PlannerInfo *root, RelOptInfo *rel);
681
- @@ -211,5 +259,6 @@ extern void set_foreign_size_estimates(PlannerInfo *root, RelOptInfo *rel);
682
- extern PathTarget *set_pathtarget_cost_width(PlannerInfo *root, PathTarget *target);
681
+ @@ -212,5 +260,6 @@ extern PathTarget *set_pathtarget_cost_width(PlannerInfo *root, PathTarget *targ
683
682
extern double compute_bitmap_pages(PlannerInfo *root, RelOptInfo *baserel,
684
- Path *bitmapqual, int loop_count, Cost *cost, double *tuple);
683
+ Path *bitmapqual, double loop_count,
684
+ Cost *cost_p, double *tuples_p);
685
685
+ extern double get_parallel_divisor(Path *path);
686
686
687
687
#endif /* COST_H */
688
688
diff --git a/src/include/optimizer/pathnode.h b/src/include/optimizer/pathnode.h
689
- index 69be701b16..497abb69c7 100644
689
+ index 112e7c23d4e..8397995e183 100644
690
690
--- a/src/include/optimizer/pathnode.h
691
691
+++ b/src/include/optimizer/pathnode.h
692
692
@@ -18,6 +18,10 @@
@@ -701,7 +701,7 @@ index 69be701b16..497abb69c7 100644
701
701
* prototypes for pathnode.c
702
702
*/
703
703
diff --git a/src/include/optimizer/planmain.h b/src/include/optimizer/planmain.h
704
- index 5fc900737d..5e5ce876c4 100644
704
+ index aafc1737921..d520d8d5475 100644
705
705
--- a/src/include/optimizer/planmain.h
706
706
+++ b/src/include/optimizer/planmain.h
707
707
@@ -24,6 +24,12 @@ extern PGDLLIMPORT double cursor_tuple_fraction;
@@ -718,10 +718,10 @@ index 5fc900737d..5e5ce876c4 100644
718
718
* prototypes for plan/planmain.c
719
719
*/
720
720
diff --git a/src/include/utils/selfuncs.h b/src/include/utils/selfuncs.h
721
- index 2f76c473db..98b9a95d0f 100644
721
+ index f2563ad1cb3..0beac5f3139 100644
722
722
--- a/src/include/utils/selfuncs.h
723
723
+++ b/src/include/utils/selfuncs.h
724
- @@ -144 ,6 +144 ,13 @@ typedef bool (*get_index_stats_hook_type) (PlannerInfo *root,
724
+ @@ -147 ,6 +147 ,13 @@ typedef bool (*get_index_stats_hook_type) (PlannerInfo *root,
725
725
AttrNumber indexattnum,
726
726
VariableStatData *vardata);
727
727
extern PGDLLIMPORT get_index_stats_hook_type get_index_stats_hook;
@@ -735,7 +735,7 @@ index 2f76c473db..98b9a95d0f 100644
735
735
736
736
/* Functions in selfuncs.c */
737
737
738
- @@ -210 ,6 +217 ,9 @@ extern void mergejoinscansel(PlannerInfo *root, Node *clause,
738
+ @@ -213 ,6 +220 ,9 @@ extern void mergejoinscansel(PlannerInfo *root, Node *clause,
739
739
Selectivity *leftstart, Selectivity *leftend,
740
740
Selectivity *rightstart, Selectivity *rightend);
741
741
0 commit comments