The PostgreSQL Protocol: The Good, the Bad and the Future
summary
Protocol v3 is still the wire standard after 20+ years and uses messages like parse/bind/describe/execute for prepared flows and a ready for query I/T/E status byte that lets poolers know transaction state. Current quirks: copy ignores sync until copy done, cancellation requires a separate TCP connection with a 32-bit cancel token, and clients often need an extra round trip to request binary formats. Proposed changes include direct TLS in Postgres 17, lz4 compression, an “auto” binary-format setting, longer cancel tokens, cheaper out‑of‑band cancellations, and columnar/smaller-row encodings with 4–8× throughput gains.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 0:34Protocol basics
- 1:59Protocol usage and design
- 6:33Startup and handshake
- 13:01Query execution
- 22:43Client library limitations
- 23:58Copy protocol
- 25:55Cancellation protocol
- 27:36Modernizing the protocol
- 28:55Direct TLS and connection
- 32:59Compression
- 34:11Efficiency and row formats
- 37:30Session state and parameter reporting
- 40:28Future protocol evolution
- 46:45Conclusion
related talks
52mThe Wire Protocol
31mPast, Present, and Future: Logical Decoding and Replication in PostgreSQL
46mPostgreSQL 16 and beyond
42mlesser known Superpower of Postgres Logical Replication
55mWhat's New in PostgresSQL 9.3
51mHow does PostgreSQL actually work
51mPostgreSQL Top Ten Features
51mHow Postgres is Different (read BETTER than) your database
