1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-18 02:02:55 +03:00
Files
postgres/src/backend/storage
Heikki Linnakangas 613f647122 Handle cancel requests with PID 0 gracefully
If the client sent a query cancel request with backend PID 0, it
tripped an assertion. With assertions disabled, you got this in the
log instead:

    LOG:  invalid cancel request with PID 0
    LOG:  wrong key in cancel request for process 0

Query cancellations don't even require authentication, so we better
tolerate bogus requests. Fix by turning the assertion into a regular
runtime check.

Spotted while testing libpq behavior with a modified server that
didn't send BackendKeyData to the client.

Backpatch-through: 18
2025-07-30 00:39:49 +03:00
..
2025-07-22 08:30:52 -04:00
2025-07-29 09:10:41 -04:00
2025-01-01 11:21:55 -05:00
2025-04-19 19:17:42 +09:00
2025-01-01 11:21:55 -05:00
2025-01-01 11:21:55 -05:00