pg-stat-statements

How do I use pg_stat_statements extension in greenplum open source version?

偶尔善良 提交于 2020-05-17 07:10:06
问题 I am trying to use a modified greenplum open source version for development. The greenplum version is Greenplum Database 6.0.0-beta.1 build dev (based on PostgreSQL 9.4.24). I wanted to add pg_stat_statements extension to my database, and I did manage to install it on the database, following https://www.postgresql.org/docs/9.5/pgstatstatements.html. However, this extension doesn't work as expected. It only records non-plannable queries and utility queries. For all plannable queries which

Heroku + Apartment PG::Error: ERROR: function pg_stat_statements_reset() does not exist

主宰稳场 提交于 2019-12-09 16:32:45
问题 I use Apartment gem in Rails 4 to support multi-tenancy in Postgres 9.3.3 on Heroku. An error is occurred when Apartment gem creates a new tenant. Deep investigation showed that a schema was created, but no tables inside. Heroku logs showed an error: PG::Error: ERROR: function pg_stat_statements_reset() does not exist 回答1: When a new schema is created Postgres is trying to reset stats by executing the function pg_stat_statements_reset() By default, this function can only be executed by

Heroku + Apartment PG::Error: ERROR: function pg_stat_statements_reset() does not exist

余生颓废 提交于 2019-12-04 03:55:21
I use Apartment gem in Rails 4 to support multi-tenancy in Postgres 9.3.3 on Heroku. An error is occurred when Apartment gem creates a new tenant. Deep investigation showed that a schema was created, but no tables inside. Heroku logs showed an error: PG::Error: ERROR: function pg_stat_statements_reset() does not exist When a new schema is created Postgres is trying to reset stats by executing the function pg_stat_statements_reset() By default, this function can only be executed by superusers (from original doc) . Heroku doesn't give you superuser privileges. So you need to disable extension pg