Re: future of PQfn()

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Nathan Bossart" <nathandbossart(at)gmail(dot)com>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: future of PQfn()
Date: 2026-05-26 21:36:49
Message-ID: DISXKTNN3JUM.30KZW8W94LPVO@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 26 May 2026 at 18:05, Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:
> Another approach we
> could take is to just send the query via PQexecParams(), but a simple test
> (creating and unlinking 10K LOs) showed a ~41% slowdown compared to HEAD.
> So, I guess we'll need to keep PQnfn() around for now...
>
> Thoughts?

I had a small WIP patch (fully AI generated and not yet vetted by me)
lying around for unrelated reasons to make the extended protocol perform
closer to the simple protocol with pgbench --select-only by using
CreateOneShotCachedPlan to create the plan for unnamed prepared
statements (see attached).

Could you share the simple LO test you were running here and/or rerun it
with this patch applied? I'd love to know if the patch reduces the
slowdown significantly, or if something else is the bottleneck.

Attachment Content-Type Size
v1-0001-Speed-up-extended-protocol-by-using-oneshot-cache.patch text/x-patch 4.8 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2026-05-26 21:49:54 Re: First draft of PG 19 release notes
Previous Message Thom Brown 2026-05-26 21:14:32 Re: First draft of PG 19 release notes