Re: BUG #19533: Wrong results from WindowAgg run-condition pushdown on count() with EXCLUDE CURRENT ROW

From: John Naylor <johncnaylorls(at)gmail(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Chengpeng Yan <chengpeng_yan(at)outlook(dot)com>, Richard Guo <guofenglinux(at)gmail(dot)com>, "imchifan(at)163(dot)com" <imchifan(at)163(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #19533: Wrong results from WindowAgg run-condition pushdown on count() with EXCLUDE CURRENT ROW
Date: 2026-07-07 05:11:01
Message-ID: CANWCAZYT8pusrf554FpM6NgjS3uWjEkaip9oXSRVc2iu2CEqgw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 6, 2026 at 2:25 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> Given how complex Claude's logic became to get all those cases
> correct, I now think the above is the best option. I've attached a
> patch for that.

Works for me. A tiny question on this comment change:

- /* No ORDER BY clause then all rows are peers */
...
+ /* No ORDER BY clause and RANGE mode means all rows are peers. */

Was the old comment wrong? Or are all rows still peers, but that's not
sufficient to show monotonicity?

--
John Naylor
Amazon Web Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2026-07-07 05:21:56 Re: BUG #19519: REPACK can fail due to missing chunk for toast value
Previous Message Michael Paquier 2026-07-07 01:42:33 Re: BUG #19519: REPACK can fail due to missing chunk for toast value