Re: Deleting prepared statements from libpq.

Поиск
Список
Период
Сортировка
От Jelte Fennema
Тема Re: Deleting prepared statements from libpq.
Дата
Msg-id CAGECzQTb4xFAopAVokudB+L62Kt44mNAL4Z9zZ7UTrs1TRFvWA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deleting prepared statements from libpq.  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Deleting prepared statements from libpq.
Список pgsql-hackers
On Fri, 16 Jun 2023 at 16:26, Craig Ringer <craig@2ndquadrant.com> wrote:
> Nobody's implemented it.
>
> A patch to add PQclosePrepared and PQsendClosePrepared would be welcome. At least, I think so...

This might have been a pretty old thread. But I just took it upon me
to implement these functions (or well I mostly copied the
PQsendDescribe related code and did s/describe/close). I haven't
tested this code yet but I'm pretty sure it should just work (it
compiles at least).

The main reason I'm interested in this is because we're actively
working on implementing named prepared statement support for PgBouncer
in transaction pooling mode. It works with lots of client libraries
already. But sadly it doesn't work with psycopg at the moment, or at
least the closing part does not. And the reason is that psycopg closes
statements using a DEALLOCATE query instead of the Close protocol
message, because libpq does not support sending the Close protocol
message.

Afaict this is not just a problem for PgBouncer its implementation. As
far as I can tell the same is true for the Odyssey connection pooler
(which implemented named prepared statement support first).

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Order changes in PG16 since ICU introduction
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: Incorrect estimation of HashJoin rows resulted from inaccurate small table statistics