Re: future of PQfn()

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: future of PQfn()
Date: 2026-05-29 17:04:16
Message-ID: CAOYmi+=sO6dR6P2c48f6ZT9aOgzVdf+pjn3TMsehTPr8-Yxjsw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 29, 2026 at 9:42 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> Along these lines, I did consider "pinning" statements or even having
> "built-in" ones for libpq. I didn't like the "pinning" idea because that
> seemed problematic for connection poolers.

Right -- whether a general context, or multiplexed streams, or
explicit pins, proxies would have to be intimately aware of them. They
can then layer their own on top, or make sure different client
requests don't conflict, or release them on client disconnection...

> And the "built-in" idea seemed
> too libpq-centric for what I'd argue is a general problem. The other ideas
> involved guessing at what's happening based on the queries or somehow
> trying to handle failures due to missing/wrong prepared statements, none of
> which felt viable.

Agreed. (Although, for that last point, I wondered whether we could
make this idempotent somehow. I think the answer is "not worth it".)

--Jacob

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2026-05-29 17:07:34 Re: alert clients when prepared statements are deallocated
Previous Message Tom Lane 2026-05-29 16:57:43 Re: Uninitialized memory access in zic