Aurora Postgres 11.8
Is there any way possible that a non-superadmin user can run pg_stat_statements_reset()?
Details:
Have to schedule pg_stat_statements_reset() on an hourly basis, since there is no internal scheduler available in Aurora Postgres 11.8, I want to go for lambda/cronjob as only the superadmin can run it so its a security risk in my environment to expose superadmin password in a lambda/cronjob. So is there any way out in my case? can there be an sp that starts execution from non-superuser and then switch user within etc?
Thanks
The documentation for
pg_stat_statements_reset
says:Let me repeat that: Access may be granted to others using
GRANT
.