Main Issue
I'm unable to execute the function SELECT pg_stat_statements_reset(); in order to profile changes in query optimization due to insufficient permissions.
The error message reads:
permission denied for function pg_stat_statements_reset
I would like to know if there are any other ways to reset the pg_stats on Cloud SQL PostgreSQL?
Environment
- PG version: PostgreSQL 9.6.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4, 64-bit
- Platform: Google Cloud SQL PostgreSQL
- User: default postgres user with
cloudsqlsuperuserrole
Attempted Steps
I have found a previous answer on this topic which suggested that pg_stat_statements_reset() should work from the default postgres user created through the cloud console. However, the listed solution does not work, it returns the same permission denied error