Обсуждение: Re: pgsql: Ignore PlaceHolderVars when looking up statistics

Поиск
Список
Период
Сортировка

Re: pgsql: Ignore PlaceHolderVars when looking up statistics

От
Robert Haas
Дата:
On Sun, Dec 28, 2025 at 9:45 PM Richard Guo <rguo@postgresql.org> wrote:
> Ignore PlaceHolderVars when looking up statistics
>
> 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?

--
Robert Haas
EDB: http://www.enterprisedb.com



Re: pgsql: Ignore PlaceHolderVars when looking up statistics

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Dec 28, 2025 at 9:45 PM Richard Guo <rguo@postgresql.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



Re: pgsql: Ignore PlaceHolderVars when looking up statistics

От
Robert Haas
Дата:
On Fri, Jan 2, 2026 at 4:20 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

Oh, OK. Probably makes sense then, since v18 is new.

--
Robert Haas
EDB: http://www.enterprisedb.com



Re: pgsql: Ignore PlaceHolderVars when looking up statistics

От
Richard Guo
Дата:
On Sat, Jan 3, 2026 at 6:20 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > 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.

That's right.  I was actually of two minds for a while regarding the
back-patch, but in the end decided to proceed.  You can find the
discussions and the reasoning behind this decision in the link below.

https://postgr.es/m/CAMbWs49h5F66KZwLxaeXoLwHe_9jAB7Eu44UmJhhQpLA38tKhw@mail.gmail.com

- Richard