Re: BackendKeyData is mandatory?

Поиск
Список
Период
Сортировка
От Jelte Fennema-Nio
Тема Re: BackendKeyData is mandatory?
Дата
Msg-id CAGECzQSxGPVY8U1Wy8hMG=yeeVk35bP3Qr-Kkww4wZy=uFunyw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BackendKeyData is mandatory?  (Jacob Champion <jacob.champion@enterprisedb.com>)
Список pgsql-hackers
On Thu, 3 Jul 2025 at 02:03, Jacob Champion
<jacob.champion@enterprisedb.com> wrote:
> Okay, wait -- JDBC was _copying_ our weird behavior? Why? Does
> something depend it in the wild?

I'm pretty sure there was no intent behind this, but it's simply
because our weird behaviour is the simplest from the client
implementation side with a fixed 4-byte key length:
1. Store two ints in a struct/class, these default to 0.
2. When you receive a BackendKeyData during startup update the two ints
3. When client wants to cancel, send a CancelRequest with the two ints.

So if step 2 is missed, then you send this all zero message. PgBouncer
has the same behaviour.



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