mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Make sequential scans parallel-aware.
In addition, this path fills in a number of missing bits and pieces in the parallel infrastructure. Paths and plans now have a parallel_aware flag indicating whether whatever parallel-aware logic they have should be engaged. It is believed that we will need this flag for a number of path/plan types, not just sequential scans, which is why the flag is generic rather than part of the SeqScan structures specifically. Also, execParallel.c now gives parallel nodes a chance to initialize their PlanState nodes from the DSM during parallel worker startup. Amit Kapila, with a fair amount of adjustment by me. Review of previous patch versions by Haribabu Kommi and others.
This commit is contained in:
@ -4690,7 +4690,7 @@ plan_cluster_use_sort(Oid tableOid, Oid indexOid)
|
||||
comparisonCost = 2.0 * (indexExprCost.startup + indexExprCost.per_tuple);
|
||||
|
||||
/* Estimate the cost of seq scan + sort */
|
||||
seqScanPath = create_seqscan_path(root, rel, NULL);
|
||||
seqScanPath = create_seqscan_path(root, rel, NULL, 0);
|
||||
cost_sort(&seqScanAndSortPath, root, NIL,
|
||||
seqScanPath->total_cost, rel->tuples, rel->width,
|
||||
comparisonCost, maintenance_work_mem, -1.0);
|
||||
|
Reference in New Issue
Block a user