- Newest
- Most votes
- Most comments
The peak memory usage columns (total_exec_peakmem, min_exec_peakmem, and max_exec_peakmem) are available in the aurora_stat_statements function for Aurora PostgreSQL, but there are a few important considerations:
- These peak memory columns are only available in specific Aurora PostgreSQL versions:
- 16.3 and higher
- 15.7 and higher
- 14.12 and higher
-
The peak memory usage is tracked separately for the planning and execution phases of each query. The function also provides
total_plan_peakmem,min_plan_peakmem, andmax_plan_peakmemcolumns. -
To use these functions, you need to ensure that the
pg_stat_statementsextension is enabled and included in theshared_preload_librariesparameter.
Unfortunately, while these memory metrics are available at the database level through the Aurora PostgreSQL functions, there doesn't appear to be a direct way to add these specific memory usage columns to the CloudWatch Database Insights visual interface through the preferences settings.
As an alternative approach, you could:
- Query the
aurora_stat_statementsfunction directly in your database to monitor peak memory usage - Use CloudWatch to monitor overall memory usage at the instance level
- For more detailed memory analysis, consider using Performance Schema and sys schema (though this is more applicable to Aurora MySQL)
The CloudWatch agent cannot be installed on RDS instances since they are managed services, but Amazon RDS automatically sends various metrics to CloudWatch by default.
Sources
Monitoring query execution plans and peak memory for Aurora PostgreSQL - Amazon Aurora
aurora_stat_statements - Amazon Aurora
Is it possible to install and config the CloudWatch agent on an RDS instance? | AWS re:Post
answered a year ago
Relevant content
- AWS OFFICIALUpdated a year ago
