The way CTRL-C in Postgres CLI cancels queries is incredibly hack-y

27 points by runxiyu


Vaelatern

What is most fascinating is reading along going "yep, yep, I see how that is not optimal..."

At the same time recognizing the engineering tradeoffs that led to this pattern of behavior. Signal safe is hard. Interrupting a TCP connection Now (tm) is hard. Identitying exactly which query is running and for which client is hard.

All of that comes together to make a system that has warts but by golly it works.