Re: Postgres: Queries are too slow after upgrading to PG17 from PG15
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Todd Cook <cookt@blackduck.com>
Cc: Peter Geoghegan <pg@bowt.ie>,
Sajith Prabhakar Shetty <ssajith@blackduck.com>, Andrei Lepikhov <lepihov@gmail.com>, "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2025-07-31T02:49:16Z
Lists: pgsql-bugs
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Convert strategies to and from compare types
- c09e5a6a0165 18.0 cited
-
Enhance nbtree ScalarArrayOp execution.
- 5bf748b86bc6 17.0 cited
-
Improve planning of btree index scans using ScalarArrayOpExpr quals.
- a4523c5aa534 9.5.0 cited
-
Fix planning of btree index scans using ScalarArrayOpExpr quals.
- 807a40c551dd 9.3.0 cited
On Thu, 31 Jul 2025 at 07:49, Todd Cook <cookt@blackduck.com> wrote: > I work at the same company as Sajith, but on a different product. The reproducer he > provided is just a sample; it's not the only problem. Load testing in my team shows > that PG 17 is about 4x slower than PG 15 across the board. It's bordering on unusable > for production deployments. > > Unfortunately, the load testing setup doesn't really help isolate individual, regressing > queries. However, I'm more than willing to help support any further investigation if > needed or helpful. Unfortunately, we can't really work with that much information. It's not like we have a list of things we know are slower in newer versions vs older versions. Changes generally go through a large amount of testing to help ensure these regressions don't happen, so if you report one, unless someone else beat you to it, there's a decent chance we didn't know about it. There's nothing we can really do to help you based on this much information. There's just no chance we'd have shipped PG17 if it was known to be x4 slower than some previous version. You may be able to narrow down what's slower using pg_stat_statements. If you can, then use EXPLAIN and compare the plans. Did PG17 choose a different plan? Does EXPLAIN ANALYZE reveal any inaccurate statistics? Are both instances configured the same way? Once you find a specific query that's causing the issue, then a report similar to what Sajith has done is a good way to get help. David