Re: Make query cancellation keys longer

Heikki Linnakangas <hlinnaka@iki.fi>

From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Jelte Fennema-Nio <postgres@jeltef.nl>, Robert Haas <robertmhaas@gmail.com>, Jacob Champion <jacob.champion@enterprisedb.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@gmail.com>
Date: 2025-04-02T13:48:46Z
Lists: pgsql-hackers
On 01/04/2025 17:08, Heikki Linnakangas wrote:
> I think this is pretty much ready for commit. I will go over it one more 
> time, and plan to push tomorrow.

And committed, with minor a bunch more little cleanups.

Thank you to everyone involved, in particular Jelte, Robert and Jacob! I 
read through all the discussions on this and the other thread again last 
night to make sure I didn't miss anything. And what a long thread that 
was! But full of good, genuine discussions on pros and cons of various 
details. Changing the protocol is permanent in a way many other changes 
are not. I feel good about where we arrived in the end.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




Commits

  1. Add timingsafe_bcmp(), for constant-time memory comparison

  2. Add missing declarations to pg_config.h.in

  3. docs: Add a new section and a table listing protocol versions

  4. Make cancel request keys longer

  5. libpq: Add min/max_protocol_version connection options

  6. libpq: Handle NegotiateProtocolVersion message differently

  7. docs: Update phrase on message lengths in the protocol

  8. libpq: Trace all NegotiateProtocolVersion fields

  9. libpq: Add PQfullProtocolVersion to exports.txt

  10. Move cancel key generation to after forking the backend