Re: BUG #18950: pgsql function that worked in Postgresql 16 does not return in Postgresql 17
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Lowell Hought <lowell.hought@gmail.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>, pgsql-bugs@lists.postgresql.org
Date: 2025-06-14T22:26:37Z
Lists: pgsql-bugs
Lowell Hought <lowell.hought@gmail.com> writes: > Attached in three separate files. Thanks. The only thing that's really obvious here is that the rowcount estimates must be way off, because if the join outputs were as small as the planner thinks, this query couldn't take very long at all. I wonder whether your v17 installation is lacking appropriate statistics. By now autovacuum should have mostly filled that in even if you forgot to see to it when transferring data --- but maybe you had larger-than-default statistics targets in the v16 installation? Or some other change to the default settings? I'd double-check that and then do a manual ANALYZE of the whole database, and see if anything changes. regards, tom lane