# Understand memory management in Amazon RDS for PostgreSQL to avoid out of memory

DevFeed: [Understand memory management in Amazon RDS for PostgreSQL to avoid out of memory](<https://devfeed.tech/articles/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory-4713.md>)

Original publisher: [Read original article](<https://aws.amazon.com/blogs/database/understand-memory-management-in-amazon-rds-for-postgresql-to-avoid-out-of-memory/>)

Author: Ankita Singh

Published: 2026-08-19T22:21:10Z

Content type: tutorial

Language: en

Sources: [AWS Database Blog](<https://devfeed.tech/sources/aws-database-blog.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Processes](<https://devfeed.tech/topics/processes.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>), [Amazon Web Services](<https://devfeed.tech/topics/aws.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [advanced-300](<https://devfeed.tech/tags/advanced-300.md>), [amazon-aurora](<https://devfeed.tech/tags/amazon-aurora.md>), [amazon-cloudwatch](<https://devfeed.tech/tags/amazon-cloudwatch.md>), [amazon-rds](<https://devfeed.tech/tags/amazon-rds.md>), [availability](<https://devfeed.tech/tags/availability.md>), [aws](<https://devfeed.tech/tags/aws.md>), [memory](<https://devfeed.tech/tags/memory.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [postgresql-compatible](<https://devfeed.tech/tags/postgresql-compatible.md>), [processes](<https://devfeed.tech/tags/processes.md>), [production](<https://devfeed.tech/tags/production.md>), [rds-for-postgresql](<https://devfeed.tech/tags/rds-for-postgresql.md>), [technical-how-to](<https://devfeed.tech/tags/technical-how-to.md>)

## AI overview

A practical guide to PostgreSQL memory management on Amazon RDS for PostgreSQL and Amazon Aurora PostgreSQL. It explains how memory is allocated, how memory-intensive queries and diagnostic signals can be identified, and how to diagnose, prevent, and recover from out-of-memory events and excessive disk spilling.

## Source excerpt

PostgreSQL out-of-memory (OOM) events and excessive disk spilling are among the most common production incidents on Amazon RDS for PostgreSQL and Amazon Aurora PostgreSQL. Learn how PostgreSQL allocates and consumes memory, how to identify memory-intensive queries, and how to diagnose, prevent, and recover from OOM events on both engines.