Re: BUG #19534: Qual pushdown across a window subquery is unsafe with nondeterministic partition collations

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Chengpeng Yan <chengpeng_yan(at)outlook(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 #19534: Qual pushdown across a window subquery is unsafe with nondeterministic partition collations
Date: 2026-06-29 01:53:11
Message-ID: CAHewXNmaG=U6ZfBJsFyhQ=Bx0+HKR_be_UsGG7qvAX76QuAvbA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Richard Guo <guofenglinux(at)gmail(dot)com> 于2026年6月29日周一 09:41写道:
>
> On Mon, Jun 29, 2026 at 10:23 AM Tender Wang <tndrwang(at)gmail(dot)com> wrote:
> > The correct result is the most important thing. So I agree with you.
> > The fix seems obvious: we should refuse quals pushed down to the
> > subquery if the quals contain a nondeterministic partition clause var.
>
> This class of bug is currently being discussed and addressed on thread
> [1]. I suggest we consolidate the discussion there to avoid
> duplicating effort.
>
> [1] https://postgr.es/m/CAMbWs49dHFVVwx9MjYmvUrZu0L4vZTbGVyhj3T2SsWgS1Bzhzg@mail.gmail.com
>

I had noticed the thread [1] before writing a patch to fix this issue.
But I thought it was a different problem at that time.
We can shift our gaze to the thread [1]. It seems it handles all kinds
of collation problems.

--
Thanks,
Tender Wang

In response to

Browse pgsql-bugs by date

  From Date Subject
Previous Message Richard Guo 2026-06-29 01:41:07 Re: BUG #19534: Qual pushdown across a window subquery is unsafe with nondeterministic partition collations