Re: pgsql: Make cancel request keys longer
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Heikki Linnakangas <heikki.linnakangas@iki.fi>,
pgsql-committers@lists.postgresql.org
Date: 2025-04-08T17:06:33Z
Lists: pgsql-hackers
Attachments
- 0001-WIP-Fix-cancel-key-stuff.patch (text/plain) patch 0001
On 02.04.25 15:43, Heikki Linnakangas wrote: > Make cancel request keys longer This patch changed the signature of ProcSignal() -ProcSignalInit(bool cancel_key_valid, int32 cancel_key) +ProcSignalInit(char *cancel_key, int cancel_key_len) but did not update the caller in auxprocess.c: ProcSignalInit(false, 0); This gives a warning with clang. While I was looking at this, I suggest to make the first argument void *. This is consistent for passing binary data. Also, I wonder why MyCancelKeyLength is of type uint8 rather than something more mundane like int. There doesn't seem to be any API reason for this type. See attached patch for possible changes.
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