postgresql_server: enable auto_explain and set to 30s

This will log an explain for any query that takes more than 30s.
We likely will need to lower it to get the slow heavy queries that are
hitting koji's db.

This does require a restart, but after this we can change the min
duration with just a reload. If there are too many logs, we can set this
to -1 to never log.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2024-01-27 13:14:41 -08:00
parent 1d953b4678
commit 4b27b2774f

View file

@ -800,3 +800,6 @@ default_text_search_config = 'pg_catalog.english'
#------------------------------------------------------------------------------
# Add settings for extensions here
session_preload_libraries = 'auto_explain'
auto_explain.log_min_duration = '30s'