From 1869339aee73db95543d2f5ffc658194661ea89d Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sat, 16 Mar 2024 15:26:34 +0100 Subject: [PATCH] foreman/start-hydra: enable query log in postgres That way it's possible to observe which queries are fired against the DB from DBIx. This is particularly useful to find out if DBIx correctly prefetches everything it needs or if too much / too few things are loaded, see e.g. #1335. --- foreman/start-hydra.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/foreman/start-hydra.sh b/foreman/start-hydra.sh index bb8cc9095..aabd9bf4f 100755 --- a/foreman/start-hydra.sh +++ b/foreman/start-hydra.sh @@ -11,6 +11,8 @@ createdb -h $(pwd)/.hydra-data/postgres -p 64444 hydra # FATAL: database "USERNAME" does not exist createdb -h $(pwd)/.hydra-data/postgres -p 64444 "$(whoami)" || true +psql -h localhost -p 64444 <<<"alter system set log_statement='all'; select pg_reload_conf();" + hydra-init hydra-create-user alice --password foobar --role admin