Tuning PostgreSQL parameters in Amazon RDS and Amazon Aurora - AWS Prescriptive Guidance

Tuning PostgreSQL parameters in Amazon RDS and Amazon Aurora

Sumana Yanamandra, Ramu Jagini, and Rohit Kapoor, Amazon Web Services (AWS)

February 2024 (document history)

Amazon Aurora PostgreSQL-Compatible Edition and Amazon Relational Database Service (Amazon RDS) for PostgreSQL are sophisticated open-source relational database services that offer a full range of features. You can use these services to set up your PostgreSQL database on a variety of platforms and applications.

Aurora and Amazon RDS offer a simplified way to manage and operate your PostgreSQL databases. They are designed to manage the database infrastructure and provide high availability, durability, and scalability while you focus on application development. However, the default configurations of these services might not be optimal for all workloads. By default, these services are configured to run everywhere with the fewest resources possible and without introducing vulnerabilities. Tuning the parameters can help you achieve better performance, reduce downtime, and improve overall database efficiency. By optimizing the parameters for your specific workload, you can take full advantage of the capabilities that Amazon RDS and Aurora provide and maximize their benefits.

For example, you can improve performance by optimizing Aurora and Amazon RDS for PostgreSQL and configuring their parameters. You should also take performance into consideration when you create database queries. Even when you optimize database settings, the system can perform badly if your queries conduct complete table scans, when they utilize an index, or if they run expensive join or aggregate operations.

This guide is for database developers, database engineers, and administrators who want to tune memory, autovacuum, logging, and logical replication parameters for their PostgreSQL databases. The guide also covers parameters that are specific to Amazon RDS for PostgreSQL and Aurora PostgreSQL-Compatible. Tuning these parameters can help you optimize database performance and reduce resource usage for your specific workload, resulting in better performance and cost savings.