The four horsemen behind Postgres outages
3 days ago
- #Database Optimization
- #pgrust
- #PostgreSQL
- Common PostgreSQL outages are caused by VACUUM and transaction ID wraparound, where deleted rows accumulate and 32-bit IDs lead to database shutdown if not reclaimed.
- Connection limits and process-based parallelism create scaling issues, requiring restarts or tools like PgBouncer, while a thread-based model in pgrust offers a safer alternative.
- Bad query plans can drastically slow queries, with limited control over the planner, unlike databases that allow hints; pgrust aims to build an adaptive query planner.
- JSON in PostgreSQL lacks statistics and compression, leading to inefficient query plans and storage; pgrust plans to add real statistics and compression to address this.