Re: BackendKeyData is mandatory?

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Jacob Champion" <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: "Tatsuo Ishii" <ishii(at)postgresql(dot)org>, <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <hlinnaka(at)iki(dot)fi>, <peter(at)eisentraut(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BackendKeyData is mandatory?
Date: 2025-06-25 07:12:05
Message-ID: DAVFE8ECY631.1KKWX7L8S4DAQ@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue Jun 24, 2025 at 5:07 PM CEST, Jacob Champion wrote:
> So that's
> 1) return an (empty) cancellation object even if the server has not
> sent a key, and
> 2) error out when trying to cancel with an empty object?
>
> That sounds reasonable to me.

Attached is an attempt at implementing the above. I did not test it
against these systems though.

I also added small commit that checks for the 256 byte key length limit
described in the protocol documentation. This thread made me remember
that we talked about that during PGConf.dev.

Attachment Content-Type Size
v1-0001-libpq-Complain-about-missing-BackendKeyData-later.patch text/x-patch 5.4 KB
v1-0002-libpq-Disallow-cancel-keys-longer-than-256-bytes.patch text/x-patch 1.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jakub Wartak 2025-06-25 07:15:02 Re: pgsql: Introduce pg_shmem_allocations_numa view
Previous Message Peter Eisentraut 2025-06-25 07:05:23 Re: [PATCH] Fix OAuth feature detection on OpenBSD+Meson