I have an RDS (postgresql) instance which is using the default parameter group (default.postgresql14), which has pg_stat_statements
set in shared_preload_libraries:
However, the view is not available and the extension is not installed:
SELECT * FROM pg_available_extensions WHERE name = 'pg_stat_statements' ;
name | default_version | installed_version | comment
--------------------+-----------------+-------------------+------------------------------------------------------------------------
pg_stat_statements | 1.9 | | track planning and execution statistics of all SQL statements executed
(1 row)
I've also rebooted the database instance to make sure this wasn't due to the parameter group being modified after the db instance was created. Still no luck. What's going on here?
As mentioned in the comments, this was simply a matter of using:
CREATE EXTENSION pg_stat_statements;