Skip to content

sql: support pgwire query cancellation #41335

Closed
@rafiss

Description

@rafiss

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

Metadata

Metadata

Assignees

Labels

A-sql-pgcompatSemantic compatibility with PostgreSQLA-sql-pgwirepgwire protocol issues.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions