Re: A gap in preventing bogus parameterizations in a798660ebe3

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Álvaro Herrera <alvherre(at)kurilemu(dot)de>, Tender Wang <tndrwang(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Richard Guo <guofenglinux(at)gmail(dot)com>
Subject: Re: A gap in preventing bogus parameterizations in a798660ebe3
Date: 2026-11-08 19:47:03
Message-ID: b045c147-b904-4a4f-8240-6256fb50e91e@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Here's a cleaned up version of the fix, with patches for each backbranch
(it's mostly the same as master, except that 18 changed one of the plans
in regression tests, and 19 introduced pg_mask field in the struct).

I've considered fixing it per Tender's suggestion, but I didn't like it.
It feels more like after-the-fact protection - it constructs the paths
and then discards them later. I think we don't want to construct these
nonsensical parameterized paths at all. First, it adds overhead (I have
not bothered to measure how much, though). Second, I'm afraid it would
silently mask a bug/thinko elsewhere.

I'm now fairly confident the fix is correct. I'd still welcome someone
else doing a quick review, of course. But similarly to [1] I'm planning
to probably push this in a couple days, once the minor releases are out
the door.

regards

--
Tomas Vondra

Attachment Content-Type Size
v3-master-0001-Reject-join-input-paths-parameterized-by-p.patch text/x-patch 10.4 KB
v3-19-0001-Reject-join-input-paths-parameterized-by-pushe.patch text/x-patch 10.4 KB
v3-18-0001-Reject-join-input-paths-parameterized-by-pushe.patch text/x-patch 10.4 KB
v3-17-0001-Reject-join-input-paths-parameterized-by-pushe.patch text/x-patch 10.5 KB
v3-16-0001-Reject-join-input-paths-parameterized-by-pushe.patch text/x-patch 10.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-11-08 20:08:31 XMLConcat() and XMLRoot() silently drop xml values with an invalid declaration
Previous Message Andres Freund 2026-11-08 19:09:22 Re: Untrusted relations and WAL