Re: incremental sort vs. gather paths

2021-12-16 Thread Robert Haas
On Thu, Dec 16, 2021 at 12:16 PM Tomas Vondra 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) > { >

Re: incremental sort vs. gather paths

2021-12-16 Thread Tomas Vondra
On 12/16/21 17:48, Robert Haas wrote: This code introduced in ba3e76cc571eba3dea19c9465ff15ac3ac186576 looks wrong to me: total_groups = cheapest_partial_path->rows * cheapest_partial_path->parallel_workers; path = (Path *)

incremental sort vs. gather paths

2021-12-16 Thread Robert Haas
This code introduced in ba3e76cc571eba3dea19c9465ff15ac3ac186576 looks wrong to me: total_groups = cheapest_partial_path->rows * cheapest_partial_path->parallel_workers; path = (Path *) create_gather_merge_path(root, ordered_rel,