How Ctrl-C Reaches a Running Query: The Client's Cancel Packet
Ctrl-C only flips an atomic counter in the client; the receive loop notices, writes a Cancel packet, and keeps draining packets so the connection stays in sync.
Ctrl-C only flips an atomic counter in the client; the receive loop notices, writes a Cancel packet, and keeps draining packets so the connection stays in sync.
The client parses a script statement by statement, ends inline INSERT data at a blank line, and pulls the trailing comment (and its test hint) into the statement it belongs to.