Home / Companies / Neon / Blog / Post Details
Content Deep Dive

Ctrl-C in psql gives me the heebie-jeebies

Blog post from Neon

Post Details
Company
Date Published
Author
George MacKerron
Word Count
2,405
Company Posts That Month
4
Language
English
Hacker News Points
-
Post removed?
No
Summary

George MacKerron delves into the intricacies and security concerns surrounding the cancellation of queries in Postgres via the psql command-line interface, highlighting the use of Ctrl-C which sends an unencrypted CancelRequest message to the server. The process involves establishing a new connection using a special protocol version, targeting a connection rather than a specific query, and is identified via a process ID and a secret key provided by the server. Despite the availability of functions to encrypt these messages since Postgres 17, psql still sends them in plaintext, posing potential security risks such as Denial of Service attacks. The article discusses the efforts to refactor psql to utilize encrypted cancellation functions and introduces Elephantshark, a tool designed to monitor Postgres network traffic and address related challenges. MacKerron suggests measures for improved security, such as using newer Postgres versions with enhanced protocol settings and employing VPNs.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
LLM 1 6,078 960 218 +18%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.