"insufficient privilege" when accessing pg_stat_statements

Last edited: 1/16/2025

If you see the error "insufficient privilege" when accessing pg_stat_statements or when accessing Query Performance Report, it means that the Postgres role does not have required permissions.

In this case, you can run the below command to allow the Postgres role to read all statistics from the system:


_10
grant pg_read_all_stats to postgres;