Amazon RDS for PostgreSQL and Aurora PostgreSQL frequently encounter out-of-memory (OOM) errors and excessive disk spilling in production. This guide explains how PostgreSQL allocates and consumes memory, enabling engineers to identify memory-intensive queries. It provides actionable steps to diagnose, prevent, and recover from these critical incidents.
- OOM events and disk spilling are top production incidents on RDS and Aurora PostgreSQL.
- Understanding memory allocation mechanics helps pinpoint resource bottlenecks early.
- Identify memory-intensive queries to optimize execution plans and reduce pressure.
- Follow specific diagnostic and recovery workflows to minimize downtime during OOMs.
Fleet impact: Monitor memory utilization metrics closely on RDS PostgreSQL and Aurora PostgreSQL instances; tune work_mem and shared_buffers to mitigate OOM risks and reduce disk spilling, ensuring stability for your database fleet.