Re: Make query cancellation keys longer
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>,
Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>,
Thomas Munro <thomas.munro@gmail.com>, Robert Haas <robertmhaas@gmail.com>
Date: 2024-07-04T12:43:20Z
Lists: pgsql-hackers
Hi, I don't have any immediate feedback regarding this patch, but I'm wondering about one thing related to cancellations - we talk cancelling a query, but we really target a PID (or a particular backend, no matter how we identify it). I occasionally want to only cancel a particular query, but I don't think that's really possible - the query may complete meanwhile, and the backend may even get used for a different user connection (e.g. with a connection pool)? Or am I missing something important? Anyway, I wonder if making the cancellation key longer (or variable length) might be useful for this too - it would allow including some sort of optional "query ID" in the request, not just the PID. (Maybe st_xact_start_timestamp would work?) Obviously, that's not up to this patch, but it's somewhat related. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Add timingsafe_bcmp(), for constant-time memory comparison
- b282280e9b69 14.23 landed
- 9dcfcb92fff8 15.18 landed
- 1604939b2210 16.14 landed
- 8e34acfda115 17.10 landed
- 09be39112654 18.0 landed
-
Add missing declarations to pg_config.h.in
- b82e7eddb023 18.0 landed
-
docs: Add a new section and a table listing protocol versions
- b05751220b0c 18.0 landed
-
Make cancel request keys longer
- a460251f0a1a 18.0 landed
-
libpq: Add min/max_protocol_version connection options
- 285613c60a7a 18.0 landed
-
libpq: Handle NegotiateProtocolVersion message differently
- 5070349102af 18.0 landed
-
docs: Update phrase on message lengths in the protocol
- 85d799ba8a7f 18.0 landed
-
libpq: Trace all NegotiateProtocolVersion fields
- e87c14b19ed4 18.0 landed
-
libpq: Add PQfullProtocolVersion to exports.txt
- c9d94ea2158b 18.0 landed
-
Move cancel key generation to after forking the backend
- 9d9b9d46f3c5 18.0 landed