Amit Kapila <amit.kapil...@gmail.com> writes: > On latest commit-51c0f63e, I am seeing some issues w.r.t parallel query. > Consider a below case:
> create table t1(c1 int, c2 char(1000)); > insert into t1 values(generate_series(1,300000),'aaaa'); > analyze t1; > set max_parallel_degree=2; > postgres=# explain select c1, count(c1) from t1 where c1 < 1000 group by c1; > ERROR: ORDER/GROUP BY expression not found in targetlist Hm. That does not speak well for the coverage of the "run the regression tests with force_parallel_mode enabled" testing approach. > Without setting max_parallel_degree, it works fine and generate the > appropriate results. Here the issue seems to be that the code in > grouping_planner doesn't apply the required PathTarget to Path below Gather > Path due to which when we generate target list for scan plan, Yeah, fixed. I had assumed that the existing coding in create_gather_plan was OK, because it looked like it was right for a non-projecting node. But actually Gather can project (why though?), so it's not right. > Approach-2 > ------------------ > Always generate a tlist in Gather plan as we do for many other cases. I > think this approach will also resolve the issue but haven't tried yet. I think this is the correct fix. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers