Enable pgbouncer application_name_add_host config by default

This setting makes it easier to debug which application is connecting
to pgbouncer. We've had it enabled on GitLab.com for a while.

Closes #2415
This commit is contained in:
Stan Hu 2017-08-26 06:07:11 -07:00
parent 1adeaa95b6
commit 29dab6af1a
4 changed files with 4 additions and 1 deletions

View File

@ -1533,6 +1533,7 @@ external_url 'GENERATED_EXTERNAL_URL'
# pgbouncer['listen_port'] = '6432'
# pgbouncer['pool_mode'] = 'session'
# pgbouncer['server_reset_query'] = 'DISCARD ALL'
# pgbouncer['application_name_add_host'] = '1'
# pgbouncer['max_client_conn'] = '100'
# pgbouncer['default_pool_size'] = '20'
# pgbouncer['min_pool_size'] = '0'

View File

@ -141,6 +141,7 @@ default['gitlab']['pgbouncer']['listen_port'] = 6432
default['gitlab']['pgbouncer']['pool_mode'] = 'session'
default['gitlab']['pgbouncer']['server_reset_query'] = 'DISCARD ALL'
default['gitlab']['pgbouncer']['max_client_conn'] = 100
default['gitlab']['pgbouncer']['application_name_add_host'] = 1
default['gitlab']['pgbouncer']['default_pool_size'] = 20
default['gitlab']['pgbouncer']['min_pool_size'] = 0
default['gitlab']['pgbouncer']['reserve_pool_size'] = 0

View File

@ -166,7 +166,7 @@ ignore_startup_parameters = <%= @ignore_startup_parameters %>
;server_check_delay = 30
;; Use <appname - host> as application_name on server.
;application_name_add_host = 0
application_name_add_host = <%= @application_name_add_host %>
;;;
;;; Connection limits

View File

@ -67,6 +67,7 @@ describe 'gitlab-ee::pgbouncer' do
expect(content).to match(/^listen_port = 6432$/)
expect(content).to match(/^pool_mode = session$/)
expect(content).to match(/^server_reset_query = DISCARD ALL$/)
expect(content).to match(/^application_name_add_host = 1$/)
expect(content).to match(/^max_client_conn = 100$/)
expect(content).to match(/^default_pool_size = 20$/)
expect(content).to match(/^min_pool_size = 0$/)