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;