From 7e3951a0ef67b33288d9275714667dd72968ba9f Mon Sep 17 00:00:00 2001 From: mhmdksh Date: Wed, 13 Mar 2024 18:04:08 +0800 Subject: [PATCH] adding the support for pg_stat_statements --- init-db/001-setup-pg_cron.sh | 3 ++- init-db/003-setup-pg_stat_statements.sql | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 init-db/003-setup-pg_stat_statements.sql diff --git a/init-db/001-setup-pg_cron.sh b/init-db/001-setup-pg_cron.sh index 5875d59..9ab74e7 100755 --- a/init-db/001-setup-pg_cron.sh +++ b/init-db/001-setup-pg_cron.sh @@ -4,7 +4,8 @@ # Remove last line "shared_preload_libraries='citus'" sed -i '$ d' /var/lib/postgresql/data/pgdata/postgresql.conf cat <> /var/lib/postgresql/data/pgdata/postgresql.conf -shared_preload_libraries = 'pg_cron,pg_trgm' +shared_preload_libraries = 'pg_cron,pg_trgm,pg_stat_statements' +pg_stat_statements.track = all cron.database_name = 'givethio' EOT # Required to load pg_cron diff --git a/init-db/003-setup-pg_stat_statements.sql b/init-db/003-setup-pg_stat_statements.sql new file mode 100644 index 0000000..841ff0c --- /dev/null +++ b/init-db/003-setup-pg_stat_statements.sql @@ -0,0 +1 @@ +CREATE EXTENSION IF NOT EXISTS pg_stat_statements;