Re: BUG #19106: Potential regression with CTE materialization planning in Postgres 18

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: kamil(at)monicz(dot)dev
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #19106: Potential regression with CTE materialization planning in Postgres 18
Date: 2025-11-09 15:53:56
Message-ID: 1650412.1762703636@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> After upgrading from Postgres 17 to 18, one of my queries started raising an
> error:
> "unexpected outer reference in CTE query"

I agree that sounds like a bug ...

> The problematic query is:
> https://github.com/openstreetmap-ng/openstreetmap-ng/blob/eb805d8766fb4b359b96eb6b50acc8c2a835a165/app/services/element_spatial_service.py#L82-L215

... but I am not going to spend time trying to reproduce it given
this amount of detail. There's too much missing context, like what
data you were running the query on. I could spend all day, not
see the failure, and be left no wiser than before as to whether
it's already fixed or I just didn't duplicate your context closely
enough. Please see if you can reduce the problem case to a
self-contained SQL script.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2025-11-09 17:49:13 Re: BUG #19105: Parallel Hash Join crash when work_mem is small
Previous Message Tom Lane 2025-11-09 15:47:25 Re: BUG #19105: Parallel Hash Join crash when work_mem is small