Re: BUG #19102: Assertion failure in generate_orderedappend_paths with aggregate pushdown
Kuntal Ghosh <kuntalghosh.2007@gmail.com>
From: Kuntal Ghosh <kuntalghosh.2007@gmail.com>
To: kuntalghosh.2007@gmail.com, pgsql-bugs@lists.postgresql.org
Cc: akorotkov@postgresql.org
Date: 2025-11-03T05:57:51Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix assertion failure in generate_orderedappend_paths()
- 500f646368e4 18.1 landed
- c1777f2d6d43 19 (unreleased) landed
-
Avoid creating duplicate ordered append paths
- 0ea5eee37606 19 (unreleased) landed
Attachments
- 0001-Remove-incorrect-assertion-for-childrel-rows-in-orde.patch (application/octet-stream) patch 0001
On Mon, Nov 3, 2025 at 11:22 AM PG Bug reporting form <
noreply@postgresql.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