Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors

Поиск
Список
Период
Сортировка
От Kirill Reshke
Тема Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors
Дата
Msg-id CALdSSPiAjz8h772jUaV+Ea_h+yqeqmWdU4X5Vcz3FPsuw+a+Dw@mail.gmail.com
обсуждение исходный текст
Ответ на Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors  (Hannu Krosing <hannuk@google.com>)
Ответы Re: Adding an extra byte to ReadyForQuery (B) to indicate HOLD cursors
Список pgsql-hackers
On Fri, 28 Nov 2025 at 14:48, Hannu Krosing <hannuk@google.com> wrote:
>
> Would it make sense to add one more byte ('H' ?) at the end of the
> ReadyForQuery backend message to indicate that there are cursors that
> live across transactions, so thet the connection pooler knows to not
> give the database connections to other clients while this is happening
> ?

This part is actually interesting when speaking about connection
proxying (pooling, e.g. pgbouncer, odyssey, pgpool-II)
If we can inform the client that his postgresql backend has some
session-level objects (like prepared statement, temp table, advisory
lock or cursor), this will be very helpful.
On the pooler side, you can reuse or not reuse connections between
different clients based on this single byte value.



-- 
Best regards,
Kirill Reshke



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