1 # DO NOT EDIT - This file is being maintained by Chef
3 #------------------------------------------------------------------------------
5 #------------------------------------------------------------------------------
7 data_directory = '/var/lib/postgresql/<%= @version %>/main'
8 hba_file = '/etc/postgresql/<%= @version %>/main/pg_hba.conf'
9 ident_file = '/etc/postgresql/<%= @version %>/main/pg_ident.conf'
10 external_pid_file = '/var/run/postgresql/<%= @version %>-main.pid'
12 #------------------------------------------------------------------------------
13 # CONNECTIONS AND AUTHENTICATION
14 #------------------------------------------------------------------------------
16 # - Connection Settings -
18 <% if @settings[:listen_addresses] || @defaults[:listen_addresses] -%>
19 listen_addresses = '<%= @settings[:listen_addresses] || @defaults[:listen_addresses] %>'
21 port = <%= @settings[:port] || @defaults[:port] %>
22 max_connections = <%= @settings[:max_connections] || @defaults[:max_connections] %>
23 <% if @version.to_f >= 9.3 %>
24 unix_socket_directories = '/var/run/postgresql'
26 unix_socket_directory = '/var/run/postgresql'
29 # - Security and Authentication -
32 ssl_renegotiation_limit = 0
34 #------------------------------------------------------------------------------
35 # RESOURCE USAGE (except WAL)
36 #------------------------------------------------------------------------------
40 shared_buffers = <%= @settings[:shared_buffers] || @defaults[:shared_buffers] %>
41 temp_buffers = <%= @settings[:temp_buffers] || @defaults[:temp_buffers] %>
42 work_mem = <%= @settings[:work_mem] || @defaults[:work_mem] %>
43 maintenance_work_mem = <%= @settings[:maintenance_work_mem] || @defaults[:maintenance_work_mem] %>
44 max_stack_depth = <%= @settings[:max_stack_depth] || @defaults[:max_stack_depth] %>
46 #------------------------------------------------------------------------------
48 #------------------------------------------------------------------------------
52 wal_level = <%= @settings[:wal_level] || @defaults[:wal_level] %>
53 fsync = <%= @settings[:fsync] || @defaults[:fsync] %>
54 synchronous_commit = <%= @settings[:synchronous_commit] || @defaults[:synchronous_commit] %>
55 wal_buffers = <%= @settings[:wal_buffers] || @defaults[:wal_buffers] %>
56 wal_writer_delay = <%= @settings[:wal_writer_delay] || @defaults[:wal_writer_delay] %>
57 commit_delay = <%= @settings[:commit_delay] || @defaults[:commit_delay] %>
61 <% if @version.to_f < 9.5 -%>
62 checkpoint_segments = <%= @settings[:checkpoint_segments] || @defaults[:checkpoint_segments] %>
64 checkpoint_timeout = <%= @settings[:checkpoint_timeout] || @defaults[:checkpoint_timeout] %>
65 <% if @version.to_f >= 9.5 -%>
66 max_wal_size = <%= @settings[:max_wal_size] || @defaults[:max_wal_size] %>
67 min_wal_size = <%= @settings[:min_wal_size] || @defaults[:min_wal_size] %>
69 checkpoint_completion_target = <%= @settings[:checkpoint_completion_target] || @defaults[:checkpoint_completion_target] %>
73 archive_mode = <%= @settings[:archive_mode] || @defaults[:archive_mode] %>
74 <% if @settings[:archive_command] || @defaults[:archive_command] -%>
75 archive_command = '<%= @settings[:archive_command] || @defaults[:archive_command] %>'
78 #------------------------------------------------------------------------------
80 #------------------------------------------------------------------------------
82 # - Sending Server(s) -
84 max_wal_senders = <%= @settings[:max_wal_senders] || @defaults[:max_wal_senders] %>
88 hot_standby = <%= @settings[:hot_standby] || @defaults[:hot_standby] %>
89 hot_standby_feedback = <%= @settings[:hot_standby_feedback] || @defaults[:hot_standby_feedback] %>
91 #------------------------------------------------------------------------------
93 #------------------------------------------------------------------------------
95 # - Planner Cost Constants -
97 random_page_cost = <%= @settings[:random_page_cost] || @defaults[:random_page_cost] %>
98 cpu_tuple_cost = <%= @settings[:cpu_tuple_cost] || @defaults[:cpu_tuple_cost] %>
99 effective_cache_size = <%= @settings[:effective_cache_size] || @defaults[:effective_cache_size] %>
101 #------------------------------------------------------------------------------
102 # ERROR REPORTING AND LOGGING
103 #------------------------------------------------------------------------------
107 log_min_duration_statement = <%= @settings[:log_min_duration_statement] || @defaults[:log_min_duration_statement] %>
111 log_line_prefix = '%t '
113 #------------------------------------------------------------------------------
114 # AUTOVACUUM PARAMETERS
115 #------------------------------------------------------------------------------
117 autovacuum_max_workers = <%= @settings[:autovacuum_max_workers] || @defaults[:autovacuum_max_workers] %>
119 #------------------------------------------------------------------------------
120 # CLIENT CONNECTION DEFAULTS
121 #------------------------------------------------------------------------------
123 # - Locale and Formatting -
125 datestyle = 'iso, dmy'
126 lc_messages = 'en_GB.UTF-8'
127 lc_monetary = 'en_GB.UTF-8'
128 lc_numeric = 'en_GB.UTF-8'
129 lc_time = 'en_GB.UTF-8'
130 default_text_search_config = 'pg_catalog.english'