RDS PostgreSQL

RDS for PostgreSQL is a fully managed database service from AWS. However there are still some DBA tasks required...

https://aws.amazon.com/blogs/database/common-administrator-responsibilities-on-amazon-rds-and-aurora-for-postgresql-databases/

Database Information

To find out key information about the RDS databases deployed in your AWS account...

aws rds describe-db-instances

Version

aws rds describe-db-instances | grep -E 'DBInstanceIdentifier|Engine'

Parameter Group

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html 

The parameter group is the AWS equivalent of the postgresql.conf file.

Database Log Files

NOTE: By default, RDS and Aurora instances retain logs for 3–7 days. (Optionally) run custom bash scripts to download the log files locally or to an Amazon EC2 instance or an Amazon S3 bucket to maintain log files for a longer period. 

AWS recommend use of pgBadger (1).


An example pgBadger report can be found here: https://aws-database-blog.s3.amazonaws.com/artifacts/Common_DBA_responsibilities/postgres_sample.html 

Maintenance and Management

Monitoring

Enable Enhanced Monitoring

https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.html

Via AWS Console...

RDS - Database - Modify... In the Monitoring section click Enable Enhanced Monitoring. Choose rds-monitoring-role if it exists, otherwise choose Default and allow AWS to create the necessary IAM role automatically.