News for hackers. Stuff that matters.
Re:The way CTRL-C in Postgres CLI cancels queries is incredi... by asveikau on Monday March 23, 2026 @11:10AM (#47490599)
> These days you'd implement cancellation by having one thread handle inbound messages and another thread do the actual work with shared memory to implement a cooperative cancellation mechanic.

Doesn't necessarily need a thread per connection. Could be on an epoll/kqueue/io-uring.

The query would need to periodically re-check a cancellation flag, which has costs and would come with a delay if it's particularly busy.

There are no comments on this comment yet.