hs.hsadmin.ng/etc/postgresql-log-slow-queries.conf
Michael Hoennig e1fda412ae rbac-optimization (#80)
Co-authored-by: Michael Hoennig <michael@hoennig.de>
Reviewed-on: #80
Reviewed-by: Marc Sandlus <marc.sandlus@hostsharing.net>
2024-07-27 10:18:07 +02:00

11 lines
477 B
Plaintext

shared_preload_libraries = 'pg_stat_statements,auto_explain'
log_min_duration_statement = 1000
log_statement = 'all'
log_duration = on
pg_stat_statements.track = all
auto_explain.log_min_duration = '1s' # Logs queries taking longer than 1 second
auto_explain.log_analyze = on # Include actual run times
auto_explain.log_buffers = on # Include buffer usage statistics
auto_explain.log_format = 'json' # Format the log output in JSON
listen_addresses = '*'