Re: BUG #19076: Generic query plan is extremely slow

Laurenz Albe <laurenz.albe@cybertec.at>

From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Premal Patel <premal.patel@veeva.com>, David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2025-10-08T11:41:03Z
Lists: pgsql-bugs
On Wed, 2025-10-08 at 07:17 -0400, Premal Patel wrote:
> Would it be unsafe to set “plan_cache_mode” to “force_custom_plan”
> for the entirety of the connection?

No, that's not unsafe at all, but you'd lose the performance advantage
of reusing plans, which can be substantial for short statements.

Yours,
Laurenz Albe