Re: BUG #19102: Assertion failure in generate_orderedappend_paths with aggregate pushdown

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: kuntalghosh(dot)2007(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: akorotkov(at)postgresql(dot)org
Subject: Re: BUG #19102: Assertion failure in generate_orderedappend_paths with aggregate pushdown
Date: 2025-11-03 05:57:51
Message-ID: CAGz5QCKuD54qPVnQAUXEoQzWmpVNty8NNoMNnKzrSE3qBRCJDw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Nov 3, 2025 at 11:22 AM PG Bug reporting form <
noreply(at)postgresql(dot)org> wrote:

>
> Server crashes with assertion failure:
> TRAP: FailedAssertion("childrel->rows > 0", File: "allpaths.c", Line: 1983)
>
> To fix the issue, we can replace the direct division with
> clamp_row_est(childrel->rows) to safely handle zero, and remove the
> incorrect assertion:
>
> - Assert(childrel->rows > 0);
> - path_fraction /= childrel->rows;
> + path_fraction /= clamp_row_est(childrel->rows);
>
> Added a patch with the proposed fix and regression test.

--
Thanks & Regards,
Kuntal Ghosh

Attachment Content-Type Size
0001-Remove-incorrect-assertion-for-childrel-rows-in-orde.patch application/octet-stream 4.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Haiyang Li 2025-11-03 09:16:02 Re: BUG #19100: Different column type between partitioned table and detached pending partition table make errors
Previous Message PG Bug reporting form 2025-11-03 05:51:09 BUG #19102: Assertion failure in generate_orderedappend_paths with aggregate pushdown