Re: pgsql: Ignore PlaceHolderVars when looking up statistics

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Richard Guo <rguo(at)postgresql(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Ignore PlaceHolderVars when looking up statistics
Date: 2026-01-02 21:20:41
Message-ID: 271338.1767388841@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sun, Dec 28, 2025 at 9:45 PM Richard Guo <rguo(at)postgresql(dot)org> wrote:
>> Back-patch to v18. Although this issue exists before that, changes in
>> this version made it common enough to notice. Given the lack of field
>> reports for older versions, I am not back-patching further.

> Generally we don't back-patch fixes that could change plans, because
> it tends to produce user complaints. It's maybe more justifiable in
> this case because v18 is quite new and you didn't back-patch to older
> releases, but are we sure that it's warranted even there?

It's a regression if we don't. See nearby complaint at

https://www.postgresql.org/message-id/flat/b75866aa-bb54-456b-8f88-6b5bc52064ca%40app.fastmail.com

That case was correctly handled in v17 and before.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2026-01-02 23:32:40 Re: pgsql: Ignore PlaceHolderVars when looking up statistics
Previous Message Robert Haas 2026-01-02 20:46:13 Re: pgsql: Ignore PlaceHolderVars when looking up statistics

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-01-02 21:35:39 Re: planner makes provably suboptimal index selection choices with partial indexes
Previous Message Robert Haas 2026-01-02 21:10:06 Re: confusing results from pg_get_replication_slots()