Re: Postgres: Queries are too slow after upgrading to PG17 from PG15

From: Sajith Prabhakar Shetty <ssajith(at)blackduck(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres: Queries are too slow after upgrading to PG17 from PG15
Date: 2025-05-15 16:21:10
Message-ID: DM4SPRMB00127B778BCB2A2032AFF420B590A@DM4SPRMB0012.namprd19.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Tom,

Thanks for the response.

In my first test, I used pg_upgrade to upgrade the instance from 15 to 17, and in my second test, I created PG15 and PG17 separately from brew repo, I don’t think I am using debug build here.

Sajith P Shetty
Principal Engineer
Black Duck
M +91 9448389989<tel:+919448389989>| ssajith(at)blackduck(dot)com<mailto:ssajith(at)blackduck(dot)com>
[signature_778616162]

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Date: Thursday, 15 May 2025 at 9:16 PM
To: Sajith Prabhakar Shetty <ssajith(at)blackduck(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Postgres: Queries are too slow after upgrading to PG17 from PG15
Sajith Prabhakar Shetty <ssajith(at)blackduck(dot)com> writes:
> Now surprisingly one of the query i took from application which used to execute in 2s in PG15, is now taking 1min+ in PG17.

The data you've actually showed us does not back up that complaint.
But I do see a 2x slowdown.

> Explain plan of the two queries almost same, all the joins and paths used are exactly same.

Yeah, that is odd. The only simple explanation I can think of is that you
are using a debug build of v17.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Karl O. Pinc 2025-05-15 17:25:59 PGXS does not properly uninstall documentation
Previous Message Tom Lane 2025-05-15 15:46:31 Re: Postgres: Queries are too slow after upgrading to PG17 from PG15