Step 1: Configure RDS Instance
In order to set up pganalyze monitoring for Amazon RDS you'll need to first follow these steps to enable the pg_stat_statements extension for collecting query statistics.
This guide assumes you have an already running Amazon RDS PostgreSQL server you want to monitor.
In your AWS Console, modify your existing custom DB Parameter Group, or create a new custom DB Parameter Group:
Then set the following configuration parameters:
|pg_stat_statements.track||ALL||Optional, enables tracking of queries inside stored procedures|
|track_io_timing||1||Optional, enables tracking of per-query I/O statistics|
In case you created a new parameter group you'll have to modify your database to use the Parameter Group you created earlier:
Enable Enhanced Monitoring
We also highly recommend turning on Enhanced Monitoring, if you haven't already - it will give you
more detailed system-level statistics that can be helpful, e.g. to debug I/O issues.
If Enhanced Monitoring is enabled, pganalyze will automatically collect and show this additional information in the dashboard as well.
Reboot your database
To enable the extension you need to reboot your database.
Note that this only needs to be done if you haven't enabled pg_stat_statements on this database before.
Verify that pg_stat_statements is enabled
Connect to your database as an RDS superuser (usually the credentials you created the database with), e.g. using
Run the following SQL commands to enable the extension, and make sure it was installed correctly:
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public; SELECT * FROM pg_stat_statements LIMIT 1;
This should return one row of query statistics information - if it gives an error you might not have restarted your database or changed the configuration correctly.
Continue by creating the monitoring user:Proceed to Step 2: Create Monitoring User
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →