Re: pgsql: Make cancel request keys longer

2025-04-09 Thread Heikki Linnakangas
On 08/04/2025 20:06, Peter Eisentraut wrote: 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 no

Re: pgsql: Make cancel request keys longer

2025-04-09 Thread Peter Eisentraut
On 09.04.25 10:53, Heikki Linnakangas wrote: On 08/04/2025 22:41, Heikki Linnakangas wrote: On 08/04/2025 20:06, Peter Eisentraut wrote: While I was looking at this, I suggest to make the first argument void *.  This is consistent for passing binary data. Ok, sure. On second thoughts, -1 on

Re: pgsql: Make cancel request keys longer

2025-04-09 Thread Heikki Linnakangas
On 08/04/2025 22:41, Heikki Linnakangas wrote: On 08/04/2025 20:06, Peter Eisentraut wrote: While I was looking at this, I suggest to make the first argument void *.  This is consistent for passing binary data. Ok, sure. On second thoughts, -1 on that. 'void *' is appropriate for functions

Re: pgsql: Make cancel request keys longer

2025-04-08 Thread Peter Eisentraut
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: ProcSign

pgsql: Make cancel request keys longer

2025-04-02 Thread Heikki Linnakangas
Make cancel request keys longer Currently, the cancel request key is a 32-bit token, which isn't very much entropy. If you want to cancel another session's query, you can brute-force it. In most environments, an unauthorized cancellation of a query isn't very serious, but it nevertheless would be