Re: pgsql: Make cancel request keys longer
Jacob Champion <jacob.champion@enterprisedb.com>
From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Peter Eisentraut <peter@eisentraut.org>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-05-08T22:28:24Z
Lists: pgsql-hackers
On Thu, May 8, 2025 at 12:11 PM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> Polished this up a tiny bit, and committed.
Thanks! I think the uint8->int change for cancel_key_len is more than
just cosmetic; it most likely fixes a bug where a key size of 256
wrapped around to 0. I'll double-check that this fixes that later;
I've gotten side-tracked from the protocol stuff a bit.
While I have you, though, is the following just a really complicated
way to say `msgLength - 4`, or is there some other reason to do the
pointer math?
cancel_key_len = 5 + msgLength - (conn->inCursor - conn->inStart);
--Jacob
Commits
-
Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays
- b28c59a6cd08 18.0 landed
-
Use more mundane 'int' type for cancel key lengths in libpq
- 965213d9c56a 18.0 landed
-
Fix a few oversights in the longer cancel keys patch
- 0f1433f05356 18.0 landed
-
Make cancel request keys longer
- a460251f0a1a 18.0 cited