Re: BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: efremov20081(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function
Date: 2024-02-05 00:16:40
Message-ID: 4148241.1707092200@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> Below is an example of queries. It shows that the query planner chooses
> sequential aggregation instead of parallel, although limit should not have
> affected this.

On what grounds do you assert that LIMIT can be parallelized?
AFAICS it has to be done by a single process to ensure that the
limit is enforced accurately. So LIMIT below an aggregation
removes the opportunity to parallelize the aggregation.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2024-02-05 02:06:34 Re: Potential data loss due to race condition during logical replication slot creation
Previous Message PG Bug reporting form 2024-02-04 20:35:02 BUG #18330: The query planner chooses the wrong plan when using the parallel aggregation function