Merge branch 'pg-slow-query-logging' into 'master'

Allow enabling PG slow query logging



See merge request !516
This commit is contained in:
Marin Jankovski 2015-10-19 08:27:54 +00:00
commit e3c4013d4c
2 changed files with 2 additions and 1 deletions

View File

@ -299,6 +299,7 @@ end
default['gitlab']['postgresql']['work_mem'] = "8MB"
default['gitlab']['postgresql']['effective_cache_size'] = "#{(node['memory']['total'].to_i / 2) / (1024)}MB"
default['gitlab']['postgresql']['log_min_duration_statement'] = -1 # Disable slow query logging by default
default['gitlab']['postgresql']['checkpoint_segments'] = 10
default['gitlab']['postgresql']['checkpoint_timeout'] = "5min"
default['gitlab']['postgresql']['checkpoint_completion_target'] = 0.9

View File

@ -360,7 +360,7 @@ effective_cache_size = <%= node['gitlab']['postgresql']['effective_cache_size']
# fatal
# panic (effectively off)
#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
log_min_duration_statement = <%= @log_min_duration_statement %> # -1 is disabled, 0 logs all statements
# and their durations, > 0 logs only
# statements running at least this number
# of milliseconds