On Thu, Dec 16, 2021 at 12:16 PM Tomas Vondra <tomas.von...@enterprisedb.com> wrote: > Maybe, but other places (predating incremental sort) creating Gather > Merge do the same thing, and commit ba3e76cc57 merely copied this. For > example generate_gather_paths() does this: > > foreach(lc, rel->partial_pathlist) > { > Path *subpath = (Path *) lfirst(lc); > GatherMergePath *path; > > if (subpath->pathkeys == NIL) > continue; > > rows = subpath->rows * subpath->parallel_workers; > path = create_gather_merge_path(root, rel, subpath, > rel->reltarget, > subpath->pathkeys, NULL, rowsp); > add_path(rel, &path->path); > } > > i.e. it's doing the same (rows * parallel_workers) calculation.
Ugh. I was hoping this mess wasn't my fault, but it seems that it is. :-( -- Robert Haas EDB: http://www.enterprisedb.com