Closed
Description
Postgres docs describe how BackendKeyData
is initialized by the DB on startup and sent to the client so it can be used for cancellation requests later.
https://www.postgresql.org/docs/12/protocol-flow.html
BackendKeyData
This message provides secret-key data that the frontend must save if it wants to be able to issue cancel requests later. The frontend should not respond to this message, but should continue listening for a ReadyForQuery message.
CockroachDB has a separate cancel query syntax. For increased compatibility, we should support the Postgres version too.
There have been other attempts at doing this in the past, but they had some issues.
See #13009 #13191 #17003 #34520
Epic CRDB-7644