Database
Preventing WAL growth on Postgres running on AWS RDS
In this document, we will discuss how to prevent WAL growth for a Postgres database running on AWS RDS.
Last updated: 04/17/2024
Enable heartbeats for idle databases
You only need to enable this feature if your database is low traffic or idle for long periods of time, which are primarily test databases. This feature is not necessary for active databases because the WAL growth will reset as soon as there are data changes from the table(s) you are observing.
- To turn this on, you’ll need to run the following script:
- Then click
Enable heartbeats
in deployment advanced settings.
If you are still seeing WAL growth with heartbeats enabled
- Does your heartbeats table (
test_heartbeat_table
) actually exist? - Is the heartbeats table included in your Postgres publications?
- Does the service account have permissions to write to the table?
- Are there any long-running queries that may prevent your replication slot from being advanced?
Was this page helpful?