Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17

From: Lowell Hought <lowell(dot)hought(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17
Date: 2025-06-08 03:08:06
Message-ID: CAJtAGPrbzMT=RqHSt2+VjtQNgPbV_JYB-iJVgDtm=EiLmY2Mog@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

My initial response that changing the parameter worked was mistaken. I
forgot to shut down version 16 so the function call happened on that
instance. I now shut down 16, fired up 17 and set the parameter, and the
behavior did not change. The query itself returns results in about 1
second. The function never returns at all, it just sits there.

Lowell

On Sat, Jun 7, 2025 at 10:02 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Lowell Hought <lowell(dot)hought(at)gmail(dot)com> writes:
> > Yes! I just changed the parameter as you suggested and the query
> returned
> > as expected.
> > So I guess something changed between version 16 and version 17? Perhaps
> > the default for that setting?
>
> No, that default has not changed. What apparently happened is that
> cost estimates or something changed enough to persuade the planner
> to use a generic plan that's considerably inferior to what it was
> choosing before. There's nowhere near enough info in your report
> to pin it down more closely than that.
>
> Just to eliminate the obvious --- you did run ANALYZE after the
> upgrade, right? If you had any nondefault settings of
> default_statistics_target or similar planner parameters,
> did you make sure they got transferred to the new installation?
>
> regards, tom lane
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-06-08 03:11:11 Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17
Previous Message Lowell Hought 2025-06-08 03:04:03 Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17