Re: Make query cancellation keys longer

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Subject: Re: Make query cancellation keys longer
Date: 2025-02-22 14:58:26
Message-ID: CAGECzQTfc_O+HXqAo5_-xG4r3EFVsTefUeQzSvhEyyLDba-O9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 9 Sept 2024 at 17:58, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Fri, Aug 16, 2024 at 11:29 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > > I'll split this patch like that, to make it easier to compare and merge
> > > with Jelte's corresponding patches.
> >
> > That sounds great. IMHO, comparing and merging the patches is the next
> > step here and would be great to see.
>
> Heikki, do you have any update on this work?

My patchset in the other protocol thread needed a rebase. So I took
that as an opportunity to rebase this patchset on top of it, because
this seems to be the protocol change that we can most easily push over
the finish line.

1. I changed the last patch from Heikki to only contain the changes
for the cancel lengthening. The general protocol change related things
I merged with mine (I only kept some error handling and docs).
2. I also removed the length field in the new BackendKey definition,
eventhough I asked for that addition previously. I agree with Heikki
that it's actually easier to parse and create without, because you can
use the same code for both versions.
3. I made our timingsafe_bcmp implementation call into OpenSSL's CRYPTO_memcmp.

One open question on the last patch is: Document what the maximum size
of the cancel key is that the client can expect? I think Jacob might
have some ideas on that.

Attachment Content-Type Size
v4-0001-libpq-Add-PQfullProtocolVersion-to-exports.txt.patch text/x-patch 812 bytes
v4-0002-libpq-Trace-NegotiateProtocolVersion-correctly.patch text/x-patch 1.4 KB
v4-0003-libpq-Handle-NegotiateProtocolVersion-message-dif.patch text/x-patch 5.9 KB
v4-0004-libpq-Add-min-max_protocol_version-connection-opt.patch text/x-patch 11.8 KB
v4-0005-Bump-protocol-version-to-3.2.patch text/x-patch 12.5 KB
v4-0006-Add-timingsafe_bcmp-for-constant-time-memory-comp.patch text/x-patch 5.3 KB
v4-0007-Make-cancel-request-keys-longer.patch text/x-patch 26.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2025-02-22 15:00:01 Re: generic plans and "initial" pruning
Previous Message Richard Guo 2025-02-22 14:55:41 Re: Virtual generated columns