pvcglue 0.1.39 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-gemset +1 -0
  3. data/.ruby-version +1 -0
  4. data/README.md +12 -3
  5. data/bin/pvc +4 -2
  6. data/lib/pvcglue.rb +106 -21
  7. data/lib/pvcglue/bootstrap.rb +1 -1
  8. data/lib/pvcglue/cli.rb +28 -17
  9. data/lib/pvcglue/cloud.rb +243 -56
  10. data/lib/pvcglue/configuration.rb +43 -5
  11. data/lib/pvcglue/connection.rb +236 -0
  12. data/lib/pvcglue/custom_hashie.rb +3 -0
  13. data/lib/pvcglue/db.rb +19 -13
  14. data/lib/pvcglue/digital_ocean.rb +21 -0
  15. data/lib/pvcglue/env.rb +52 -28
  16. data/lib/pvcglue/manager.rb +38 -25
  17. data/lib/pvcglue/minion.rb +182 -0
  18. data/lib/pvcglue/nodes.rb +1 -1
  19. data/lib/pvcglue/{packages → old_packages}/bootstrap.rb +15 -15
  20. data/lib/pvcglue/{packages → old_packages}/env.rb +8 -8
  21. data/lib/pvcglue/old_packages/firewall.rb +48 -0
  22. data/lib/pvcglue/old_packages/manager.rb +116 -0
  23. data/lib/pvcglue/{packages → old_packages}/monit-bootstrap.rb +0 -0
  24. data/lib/pvcglue/{packages → old_packages}/monit-web.rb +0 -0
  25. data/lib/pvcglue/{packages → old_packages}/nginx.rb +0 -0
  26. data/lib/pvcglue/{packages → old_packages}/nodejs.rb +0 -0
  27. data/lib/pvcglue/{packages → old_packages}/passenger.rb +0 -0
  28. data/lib/pvcglue/old_packages/postgresql.rb +10 -0
  29. data/lib/pvcglue/{packages → old_packages}/role_db.rb +9 -9
  30. data/lib/pvcglue/{packages → old_packages}/role_lb.rb +6 -6
  31. data/lib/pvcglue/{packages → old_packages}/role_memcached.rb +0 -0
  32. data/lib/pvcglue/{packages → old_packages}/role_redis.rb +0 -0
  33. data/lib/pvcglue/{packages → old_packages}/role_web.rb +9 -9
  34. data/lib/pvcglue/old_packages/rvm.rb +78 -0
  35. data/lib/pvcglue/{packages → old_packages}/timezone.rb +0 -0
  36. data/lib/pvcglue/{packages → old_packages}/ubuntu.rb +0 -0
  37. data/lib/pvcglue/packages.rb +192 -71
  38. data/lib/pvcglue/packages/apt.rb +74 -0
  39. data/lib/pvcglue/packages/apt_repos.rb +48 -0
  40. data/lib/pvcglue/packages/apt_update.rb +18 -0
  41. data/lib/pvcglue/packages/apt_upgrade.rb +20 -0
  42. data/lib/pvcglue/packages/authorized_keys.rb +33 -0
  43. data/lib/pvcglue/packages/bundler.rb +14 -0
  44. data/lib/pvcglue/packages/dir_base.rb +16 -0
  45. data/lib/pvcglue/packages/dir_shared.rb +16 -0
  46. data/lib/pvcglue/packages/firewall.rb +30 -46
  47. data/lib/pvcglue/packages/load_balancer.rb +71 -0
  48. data/lib/pvcglue/packages/maintenance_mode.rb +28 -0
  49. data/lib/pvcglue/packages/manager.rb +101 -99
  50. data/lib/pvcglue/packages/postgresql.rb +36 -8
  51. data/lib/pvcglue/packages/roles.rb +23 -0
  52. data/lib/pvcglue/packages/ruby.rb +13 -0
  53. data/lib/pvcglue/packages/rvm.rb +18 -71
  54. data/lib/pvcglue/packages/secrets.rb +36 -0
  55. data/lib/pvcglue/packages/ssh_key_check.rb +11 -0
  56. data/lib/pvcglue/packages/ssl.rb +45 -0
  57. data/lib/pvcglue/packages/ssl_acme.rb +29 -0
  58. data/lib/pvcglue/packages/swap.rb +14 -0
  59. data/lib/pvcglue/packages/unattended_upgrades.rb +20 -0
  60. data/lib/pvcglue/packages/users.rb +20 -0
  61. data/lib/pvcglue/packages/web.rb +50 -0
  62. data/lib/pvcglue/stack.rb +166 -0
  63. data/lib/pvcglue/templates/50unattended-upgrades.erb +63 -0
  64. data/lib/pvcglue/templates/capfile.erb +4 -1
  65. data/lib/pvcglue/templates/deploy.rb.erb +3 -2
  66. data/lib/pvcglue/templates/lb.sites-enabled.erb +15 -9
  67. data/lib/pvcglue/templates/letsencrypt-webroot.erb +3 -0
  68. data/lib/pvcglue/templates/pg_hba.conf.erb +1 -2
  69. data/lib/pvcglue/templates/postgresql.conf.erb +376 -291
  70. data/lib/pvcglue/templates/stage-deploy.rb.erb +2 -2
  71. data/lib/pvcglue/templates/web.bashrc.erb +16 -5
  72. data/lib/pvcglue/templates/web.nginx.conf.erb +1 -1
  73. data/lib/pvcglue/templates/web.sites-enabled.erb +1 -1
  74. data/lib/pvcglue/version.rb +1 -1
  75. data/pvcglue.gemspec +17 -12
  76. metadata +125 -22
@@ -0,0 +1,63 @@
1
+ // Automatically upgrade packages from these (origin:archive) pairs
2
+ Unattended-Upgrade::Allowed-Origins {
3
+ "${distro_id}:${distro_codename}";
4
+ "${distro_id}:${distro_codename}-security";
5
+ // "${distro_id}:${distro_codename}-updates";
6
+ // "${distro_id}:${distro_codename}-proposed";
7
+ // "${distro_id}:${distro_codename}-backports";
8
+ };
9
+
10
+ // List of packages to not update (regexp are supported)
11
+ Unattended-Upgrade::Package-Blacklist {
12
+ // "vim";
13
+ // "libc6";
14
+ // "libc6-dev";
15
+ // "libc6-i686";
16
+ };
17
+
18
+ // This option allows you to control if on a unclean dpkg exit
19
+ // unattended-upgrades will automatically run
20
+ // dpkg --force-confold --configure -a
21
+ // The default is true, to ensure updates keep getting installed
22
+ //Unattended-Upgrade::AutoFixInterruptedDpkg "false";
23
+
24
+ // Split the upgrade into the smallest possible chunks so that
25
+ // they can be interrupted with SIGUSR1. This makes the upgrade
26
+ // a bit slower but it has the benefit that shutdown while a upgrade
27
+ // is running is possible (with a small delay)
28
+ //Unattended-Upgrade::MinimalSteps "true";
29
+
30
+ // Install all unattended-upgrades when the machine is shuting down
31
+ // instead of doing it in the background while the machine is running
32
+ // This will (obviously) make shutdown slower
33
+ //Unattended-Upgrade::InstallOnShutdown "true";
34
+
35
+ // Send email to this address for problems or packages upgrades
36
+ // If empty or unset then no email is sent, make sure that you
37
+ // have a working mail setup on your system. A package that provides
38
+ // 'mailx' must be installed. E.g. "user@example.com"
39
+ //Unattended-Upgrade::Mail "root";
40
+
41
+ // Set this value to "true" to get emails only on errors. Default
42
+ // is to always send a mail if Unattended-Upgrade::Mail is set
43
+ //Unattended-Upgrade::MailOnlyOnError "true";
44
+
45
+ // Do automatic removal of new unused dependencies after the upgrade
46
+ // (equivalent to apt-get autoremove)
47
+ //Unattended-Upgrade::Remove-Unused-Dependencies "false";
48
+
49
+ // Automatically reboot *WITHOUT CONFIRMATION*
50
+ // if the file /var/run/reboot-required is found after the upgrade
51
+ //Unattended-Upgrade::Automatic-Reboot "false";
52
+
53
+ // If automatic reboot is enabled and needed, reboot at the specific
54
+ // time instead of immediately
55
+ // Default: "now"
56
+ //Unattended-Upgrade::Automatic-Reboot-Time "02:00";
57
+
58
+ // Use apt bandwidth limit feature, this example limits the download
59
+ // speed to 70kb/sec
60
+ //Acquire::http::Dl-Limit "70";
61
+
62
+ Unattended-Upgrade::Automatic-Reboot "true";
63
+ Unattended-Upgrade::Automatic-Reboot-Time "02:00";
@@ -10,10 +10,13 @@ require 'capistrano/rvm'
10
10
  set :rvm_type, :user
11
11
 
12
12
  require 'capistrano/bundler'
13
+
14
+ <% if Pvcglue.cloud.gems[:sprockets] %>
13
15
  require 'capistrano/rails/assets'
16
+ <% end %>
17
+
14
18
  require 'capistrano/rails/migrations'
15
19
  <% if Pvcglue.cloud.gems[:whenever] %>
16
-
17
20
  set :whenever_identifier, ->{ "#{fetch(:application)}_#{fetch(:stage)}" }
18
21
  require 'whenever/capistrano'
19
22
  <% end %>
@@ -2,6 +2,7 @@
2
2
 
3
3
  set :application, '<%= Pvcglue.configuration.application_name %>'
4
4
  set :repo_url, '<%= Pvcglue.cloud.repo_url %>'
5
+ set :tmp_dir, '/tmp/<%= Pvcglue.cloud.app_and_stage_name %>'
5
6
 
6
7
  set :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
7
8
 
@@ -50,8 +51,8 @@ namespace :deploy do
50
51
  end
51
52
  end
52
53
 
53
- after :started, :stop_workers
54
- after :publishing, :start_workers
54
+ # after :started, :stop_workers
55
+ # after :publishing, :start_workers
55
56
 
56
57
  # def args
57
58
  # fetch(:delayed_job_args, "")
@@ -2,7 +2,7 @@ upstream <%= Pvcglue.cloud.app_and_stage_name %>_application {
2
2
  <% if Pvcglue.cloud.lb_nginx_load_balancing_method.present? %>
3
3
  <%= Pvcglue.cloud.lb_nginx_load_balancing_method %>;
4
4
  <% end %>
5
- <% Pvcglue.cloud.nodes_in_stage('web').each do |_, node_config| %>
5
+ <% Pvcglue.cloud.minions_filtered(:web).each do |_, node_config| %>
6
6
  server <%= node_config[:private_ip] %> <%= node_config[:lb_nginx_upstream_server]%>;
7
7
  <% end %>
8
8
  }
@@ -19,7 +19,9 @@ server {
19
19
  <%= Pvcglue.render_template('denial_of_service.erb') %>
20
20
  <%= Pvcglue.render_template('maintenance_mode.erb') %>
21
21
 
22
- <% case Pvcglue.cloud.ssl_mode
22
+ include includes/letsencrypt-webroot;
23
+
24
+ <% case Pvcglue.cloud.ssl_mode_override
23
25
  when :none %>
24
26
  location / {
25
27
  proxy_set_header Host $host;
@@ -29,17 +31,17 @@ server {
29
31
 
30
32
  proxy_pass http://<%= Pvcglue.cloud.app_and_stage_name %>_application;
31
33
  }
32
- <% when :load_balancer_force_ssl %>
34
+ <% when :load_balancer_force_ssl, :acme %>
33
35
  location / {
34
36
  # According to http://serverfault.com/a/401632/156820 this is the correct way to redirect all http to https
35
37
  return 301 https://$host$request_uri;
36
38
  }
37
39
  <% else
38
- raise "Unsupported SSL option '#{Pvcglue.cloud.ssl_mode}'" %>
40
+ raise "Unsupported SSL option '#{Pvcglue.cloud.ssl_mode_override}'" %>
39
41
  <% end %>
40
42
  }
41
43
 
42
- <% unless Pvcglue.cloud.ssl_mode == :none %>
44
+ <% unless Pvcglue.cloud.ssl_mode_override == :none %>
43
45
  server {
44
46
  listen 443 ssl;
45
47
  server_name <%= Pvcglue.cloud.domains.join(' ') %>;
@@ -52,15 +54,19 @@ server {
52
54
  <%= Pvcglue.render_template('denial_of_service.erb') %>
53
55
  <%= Pvcglue.render_template('maintenance_mode.erb') %>
54
56
 
55
- <% case Pvcglue.cloud.ssl_mode
57
+ <% case Pvcglue.cloud.ssl_mode_override
56
58
  when :none %>
57
- # ssl_mode: none
58
- <% when :load_balancer_force_ssl %>
59
+ # ssl_mode_override: none
60
+ <% when :acme, :load_balancer_force_ssl %>
59
61
  ssl on;
60
62
  ssl_certificate <%= Pvcglue.cloud.nginx_ssl_crt_file_name %>;
61
63
  ssl_certificate_key <%= Pvcglue.cloud.nginx_ssl_key_file_name %>;
62
64
  <% else
63
- raise "Unsupported SSL option '#{Pvcglue.cloud.ssl_mode}'" %>
65
+ raise "Unsupported SSL option '#{Pvcglue.cloud.ssl_mode_override}'" %>
66
+ <% end %>
67
+
68
+ <% unless Pvcglue.cloud.ssl_mode_override == :none %>
69
+ include includes/letsencrypt-webroot;
64
70
  <% end %>
65
71
 
66
72
  location / {
@@ -0,0 +1,3 @@
1
+ location /.well-known/acme-challenge/ {
2
+ alias <%= Pvcglue.cloud.letsencrypt_full %>/;
3
+ }
@@ -43,7 +43,7 @@
43
43
  # directly connected to.
44
44
  #
45
45
  # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
46
- # "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
46
+ # "ident", "peer", "pam", "ldap", "radius" or "cert". Note that
47
47
  # "password" sends passwords in clear text; "md5" is preferred since
48
48
  # it sends encrypted passwords.
49
49
  #
@@ -98,4 +98,3 @@ host all all 0.0.0.0/0 md5
98
98
  #local replication postgres peer
99
99
  #host replication postgres 127.0.0.1/32 md5
100
100
  #host replication postgres ::1/128 md5
101
- # Allow external connection
@@ -27,7 +27,7 @@
27
27
  # Memory units: kB = kilobytes Time units: ms = milliseconds
28
28
  # MB = megabytes s = seconds
29
29
  # GB = gigabytes min = minutes
30
- # h = hours
30
+ # TB = terabytes h = hours
31
31
  # d = days
32
32
 
33
33
 
@@ -38,16 +38,16 @@
38
38
  # The default values of these variables are driven from the -D command-line
39
39
  # option or PGDATA environment variable, represented here as ConfigDir.
40
40
 
41
- data_directory = '/var/lib/postgresql/9.1/main' # use data in another directory
42
- # (change requires restart)
43
- hba_file = '/etc/postgresql/9.1/main/pg_hba.conf' # host-based authentication file
44
- # (change requires restart)
45
- ident_file = '/etc/postgresql/9.1/main/pg_ident.conf' # ident configuration file
46
- # (change requires restart)
41
+ data_directory = '/var/lib/postgresql/9.6/main' # use data in another directory
42
+ # (change requires restart)
43
+ hba_file = '/etc/postgresql/9.6/main/pg_hba.conf' # host-based authentication file
44
+ # (change requires restart)
45
+ ident_file = '/etc/postgresql/9.6/main/pg_ident.conf' # ident configuration file
46
+ # (change requires restart)
47
47
 
48
48
  # If external_pid_file is not explicitly set, no extra PID file is written.
49
- external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID file
50
- # (change requires restart)
49
+ external_pid_file = '/var/run/postgresql/9.6-main.pid' # write an extra PID file
50
+ # (change requires restart)
51
51
 
52
52
 
53
53
  #------------------------------------------------------------------------------
@@ -56,48 +56,52 @@ external_pid_file = '/var/run/postgresql/9.1-main.pid' # write an extra PID fil
56
56
 
57
57
  # - Connection Settings -
58
58
 
59
- listen_addresses = '*' # what IP address(es) to listen on;
60
- # comma-separated list of addresses;
61
- # defaults to 'localhost', '*' = all
62
- # (change requires restart)
63
- port = 5432 # (change requires restart)
64
- max_connections = 100 # (change requires restart)
65
- # Note: Increasing max_connections costs ~400 bytes of shared memory per
66
- # connection slot, plus lock space (see max_locks_per_transaction).
67
- #superuser_reserved_connections = 3 # (change requires restart)
68
- unix_socket_directory = '/var/run/postgresql' # (change requires restart)
69
- #unix_socket_group = '' # (change requires restart)
70
- #unix_socket_permissions = 0777 # begin with 0 to use octal notation
71
- # (change requires restart)
72
- #bonjour = off # advertise server via Bonjour
73
- # (change requires restart)
74
- #bonjour_name = '' # defaults to the computer name
75
- # (change requires restart)
59
+ listen_addresses = '*' # what IP address(es) to listen on;
60
+ # comma-separated list of addresses;
61
+ # defaults to 'localhost'; use '*' for all
62
+ # (change requires restart)
63
+ port = 5432 # (change requires restart)
64
+ max_connections = 100 # (change requires restart)
65
+ #superuser_reserved_connections = 3 # (change requires restart)
66
+ unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
67
+ # (change requires restart)
68
+ #unix_socket_group = '' # (change requires restart)
69
+ #unix_socket_permissions = 0777 # begin with 0 to use octal notation
70
+ # (change requires restart)
71
+ #bonjour = off # advertise server via Bonjour
72
+ # (change requires restart)
73
+ #bonjour_name = '' # defaults to the computer name
74
+ # (change requires restart)
76
75
 
77
76
  # - Security and Authentication -
78
77
 
79
- #authentication_timeout = 1min # 1s-600s
80
- ssl = true # (change requires restart)
81
- #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers
82
- # (change requires restart)
83
- #ssl_renegotiation_limit = 512MB # amount of data between renegotiations
78
+ #authentication_timeout = 1min # 1s-600s
79
+ ssl = true # (change requires restart)
80
+ #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
81
+ # (change requires restart)
82
+ #ssl_prefer_server_ciphers = on # (change requires restart)
83
+ #ssl_ecdh_curve = 'prime256v1' # (change requires restart)
84
+ ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem' # (change requires restart)
85
+ ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key' # (change requires restart)
86
+ #ssl_ca_file = '' # (change requires restart)
87
+ #ssl_crl_file = '' # (change requires restart)
84
88
  #password_encryption = on
85
89
  #db_user_namespace = off
90
+ #row_security = on
86
91
 
87
- # Kerberos and GSSAPI
92
+ # GSSAPI using Kerberos
88
93
  #krb_server_keyfile = ''
89
- #krb_srvname = 'postgres' # (Kerberos only)
90
94
  #krb_caseins_users = off
91
95
 
92
96
  # - TCP Keepalives -
93
97
  # see "man 7 tcp" for details
94
98
 
95
- #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
96
- # 0 selects the system default
97
- #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
98
- # 0 selects the system default
99
- #tcp_keepalives_count = 0 # TCP_KEEPCNT;
100
- # 0 selects the system default
99
+ #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds;
100
+ # 0 selects the system default
101
+ #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds;
102
+ # 0 selects the system default
103
+ #tcp_keepalives_count = 0 # TCP_KEEPCNT;
104
+ # 0 selects the system default
101
105
 
102
106
 
103
107
  #------------------------------------------------------------------------------
@@ -106,43 +110,63 @@ ssl = true # (change requires restart)
106
110
 
107
111
  # - Memory -
108
112
 
109
- shared_buffers = 24MB # min 128kB
113
+ shared_buffers = 128MB # min 128kB
110
114
  #shared_buffers = 4GB # 25% of system memory must also modify: /etc/sysctl.d/30-postgresql-shm.conf then run sysctl -p see http://serverfault.com/a/499387/156820
111
- # (change requires restart)
112
- #temp_buffers = 8MB # min 800kB
113
- #max_prepared_transactions = 0 # zero disables the feature
114
- # (change requires restart)
115
- # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory
116
- # per transaction slot, plus lock space (see max_locks_per_transaction).
117
- # It is not advisable to set max_prepared_transactions nonzero unless you
118
- # actively intend to use prepared transactions.
119
- #work_mem = 1MB # min 64kB
120
- #maintenance_work_mem = 16MB # min 1MB
121
- #max_stack_depth = 2MB # min 100kB
115
+ # (change requires restart)
116
+ #huge_pages = try # on, off, or try
117
+ # (change requires restart)
118
+ #temp_buffers = 8MB # min 800kB
119
+ #max_prepared_transactions = 0 # zero disables the feature
120
+ # (change requires restart)
121
+ # Caution: it is not advisable to set max_prepared_transactions nonzero unless
122
+ # you actively intend to use prepared transactions.
123
+ #work_mem = 4MB # min 64kB
124
+ #maintenance_work_mem = 64MB # min 1MB
125
+ #replacement_sort_tuples = 150000 # limits use of replacement selection sort
126
+ #autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem
127
+ #max_stack_depth = 2MB # min 100kB
128
+ dynamic_shared_memory_type = posix # the default is the first option
129
+ # supported by the operating system:
130
+ # posix
131
+ # sysv
132
+ # windows
133
+ # mmap
134
+ # use none to disable dynamic shared memory
135
+
136
+ # - Disk -
137
+
138
+ #temp_file_limit = -1 # limits per-process temp file space
139
+ # in kB, or -1 for no limit
122
140
 
123
141
  # - Kernel Resource Usage -
124
142
 
125
- #max_files_per_process = 1000 # min 25
126
- # (change requires restart)
127
- #shared_preload_libraries = '' # (change requires restart)
143
+ #max_files_per_process = 1000 # min 25
144
+ # (change requires restart)
145
+ #shared_preload_libraries = '' # (change requires restart)
128
146
 
129
147
  # - Cost-Based Vacuum Delay -
130
148
 
131
- #vacuum_cost_delay = 0ms # 0-100 milliseconds
132
- #vacuum_cost_page_hit = 1 # 0-10000 credits
133
- #vacuum_cost_page_miss = 10 # 0-10000 credits
134
- #vacuum_cost_page_dirty = 20 # 0-10000 credits
135
- #vacuum_cost_limit = 200 # 1-10000 credits
149
+ #vacuum_cost_delay = 0 # 0-100 milliseconds
150
+ #vacuum_cost_page_hit = 1 # 0-10000 credits
151
+ #vacuum_cost_page_miss = 10 # 0-10000 credits
152
+ #vacuum_cost_page_dirty = 20 # 0-10000 credits
153
+ #vacuum_cost_limit = 200 # 1-10000 credits
136
154
 
137
155
  # - Background Writer -
138
156
 
139
- #bgwriter_delay = 200ms # 10-10000ms between rounds
140
- #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
141
- #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round
157
+ #bgwriter_delay = 200ms # 10-10000ms between rounds
158
+ #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
159
+ #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
160
+ #bgwriter_flush_after = 512kB # measured in pages, 0 disables
142
161
 
143
162
  # - Asynchronous Behavior -
144
163
 
145
- #effective_io_concurrency = 1 # 1-1000. 0 disables prefetching
164
+ #effective_io_concurrency = 1 # 1-1000; 0 disables prefetching
165
+ #max_worker_processes = 8 # (change requires restart)
166
+ #max_parallel_workers_per_gather = 0 # taken from max_worker_processes
167
+ #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate
168
+ # (change requires restart)
169
+ #backend_flush_after = 0 # measured in pages, 0 disables
146
170
 
147
171
 
148
172
  #------------------------------------------------------------------------------
@@ -151,75 +175,101 @@ shared_buffers = 24MB # min 128kB
151
175
 
152
176
  # - Settings -
153
177
 
154
- #wal_level = minimal # minimal, archive, or hot_standby
155
- # (change requires restart)
156
- #fsync = on # turns forced synchronization on or off
157
- #synchronous_commit = on # synchronization level; on, off, or local
158
- #wal_sync_method = fsync # the default is the first option
159
- # supported by the operating system:
160
- # open_datasync
161
- # fdatasync (default on Linux)
162
- # fsync
163
- # fsync_writethrough
164
- # open_sync
165
- #full_page_writes = on # recover from partial page writes
166
- #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
167
- # (change requires restart)
168
- #wal_writer_delay = 200ms # 1-10000 milliseconds
169
-
170
- #commit_delay = 0 # range 0-100000, in microseconds
171
- #commit_siblings = 5 # range 1-1000
178
+ #wal_level = minimal # minimal, replica, or logical
179
+ # (change requires restart)
180
+ #fsync = on # flush data to disk for crash safety
181
+ # (turning this off can cause
182
+ # unrecoverable data corruption)
183
+ #synchronous_commit = on # synchronization level;
184
+ # off, local, remote_write, remote_apply, or on
185
+ #wal_sync_method = fsync # the default is the first option
186
+ # supported by the operating system:
187
+ # open_datasync
188
+ # fdatasync (default on Linux)
189
+ # fsync
190
+ # fsync_writethrough
191
+ # open_sync
192
+ #full_page_writes = on # recover from partial page writes
193
+ #wal_compression = off # enable compression of full-page writes
194
+ #wal_log_hints = off # also do full page writes of non-critical updates
195
+ # (change requires restart)
196
+ #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
197
+ # (change requires restart)
198
+ #wal_writer_delay = 200ms # 1-10000 milliseconds
199
+ #wal_writer_flush_after = 1MB # measured in pages, 0 disables
200
+
201
+ #commit_delay = 0 # range 0-100000, in microseconds
202
+ #commit_siblings = 5 # range 1-1000
172
203
 
173
204
  # - Checkpoints -
174
205
 
175
- #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each
176
- #checkpoint_timeout = 5min # range 30s-1h
177
- #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
178
- #checkpoint_warning = 30s # 0 disables
206
+ #checkpoint_timeout = 5min # range 30s-1d
207
+ #max_wal_size = 1GB
208
+ #min_wal_size = 80MB
209
+ #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
210
+ #checkpoint_flush_after = 256kB # measured in pages, 0 disables
211
+ #checkpoint_warning = 30s # 0 disables
179
212
 
180
213
  # - Archiving -
181
214
 
182
- #archive_mode = off # allows archiving to be done
183
- # (change requires restart)
184
- #archive_command = '' # command to use to archive a logfile segment
185
- #archive_timeout = 0 # force a logfile segment switch after this
186
- # number of seconds; 0 disables
215
+ #archive_mode = off # enables archiving; off, on, or always
216
+ # (change requires restart)
217
+ #archive_command = '' # command to use to archive a logfile segment
218
+ # placeholders: %p = path of file to archive
219
+ # %f = file name only
220
+ # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
221
+ #archive_timeout = 0 # force a logfile segment switch after this
222
+ # number of seconds; 0 disables
187
223
 
188
224
 
189
225
  #------------------------------------------------------------------------------
190
226
  # REPLICATION
191
227
  #------------------------------------------------------------------------------
192
228
 
229
+ # - Sending Server(s) -
230
+
231
+ # Set these on the master and on any standby that will send replication data.
232
+
233
+ #max_wal_senders = 0 # max number of walsender processes
234
+ # (change requires restart)
235
+ #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
236
+ #wal_sender_timeout = 60s # in milliseconds; 0 disables
237
+
238
+ #max_replication_slots = 0 # max number of replication slots
239
+ # (change requires restart)
240
+ #track_commit_timestamp = off # collect timestamp of transaction commit
241
+ # (change requires restart)
242
+
193
243
  # - Master Server -
194
244
 
195
- # These settings are ignored on a standby server
245
+ # These settings are ignored on a standby server.
196
246
 
197
- #max_wal_senders = 0 # max number of walsender processes
198
- # (change requires restart)
199
- #wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds
200
- #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
201
- #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
202
- #replication_timeout = 60s # in milliseconds; 0 disables
203
- #synchronous_standby_names = '' # standby servers that provide sync rep
204
- # comma-separated list of application_name
205
- # from standby(s); '*' = all
247
+ #synchronous_standby_names = '' # standby servers that provide sync rep
248
+ # number of sync standbys and comma-separated list of application_name
249
+ # from standby(s); '*' = all
250
+ #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
206
251
 
207
252
  # - Standby Servers -
208
253
 
209
- # These settings are ignored on a master server
210
-
211
- #hot_standby = off # "on" allows queries during recovery
212
- # (change requires restart)
213
- #max_standby_archive_delay = 30s # max delay before canceling queries
214
- # when reading WAL from archive;
215
- # -1 allows indefinite delay
216
- #max_standby_streaming_delay = 30s # max delay before canceling queries
217
- # when reading streaming WAL;
218
- # -1 allows indefinite delay
219
- #wal_receiver_status_interval = 10s # send replies at least this often
220
- # 0 disables
221
- #hot_standby_feedback = off # send info from standby to prevent
222
- # query conflicts
254
+ # These settings are ignored on a master server.
255
+
256
+ #hot_standby = off # "on" allows queries during recovery
257
+ # (change requires restart)
258
+ #max_standby_archive_delay = 30s # max delay before canceling queries
259
+ # when reading WAL from archive;
260
+ # -1 allows indefinite delay
261
+ #max_standby_streaming_delay = 30s # max delay before canceling queries
262
+ # when reading streaming WAL;
263
+ # -1 allows indefinite delay
264
+ #wal_receiver_status_interval = 10s # send replies at least this often
265
+ # 0 disables
266
+ #hot_standby_feedback = off # send info from standby to prevent
267
+ # query conflicts
268
+ #wal_receiver_timeout = 60s # time that receiver waits for
269
+ # communication from master
270
+ # in milliseconds; 0 disables
271
+ #wal_retrieve_retry_interval = 5s # time to wait before retrying to
272
+ # retrieve WAL after a failed attempt
223
273
 
224
274
 
225
275
  #------------------------------------------------------------------------------
@@ -232,6 +282,7 @@ shared_buffers = 24MB # min 128kB
232
282
  #enable_hashagg = on
233
283
  #enable_hashjoin = on
234
284
  #enable_indexscan = on
285
+ #enable_indexonlyscan = on
235
286
  #enable_material = on
236
287
  #enable_mergejoin = on
237
288
  #enable_nestloop = on
@@ -241,32 +292,35 @@ shared_buffers = 24MB # min 128kB
241
292
 
242
293
  # - Planner Cost Constants -
243
294
 
244
- #seq_page_cost = 1.0 # measured on an arbitrary scale
245
- #random_page_cost = 4.0 # same scale as above
246
- #cpu_tuple_cost = 0.01 # same scale as above
247
- #cpu_index_tuple_cost = 0.005 # same scale as above
248
- #cpu_operator_cost = 0.0025 # same scale as above
249
- #effective_cache_size = 128MB
250
- effective_cache_size = 8GB # 50% memory
295
+ #seq_page_cost = 1.0 # measured on an arbitrary scale
296
+ #random_page_cost = 4.0 # same scale as above
297
+ #cpu_tuple_cost = 0.01 # same scale as above
298
+ #cpu_index_tuple_cost = 0.005 # same scale as above
299
+ #cpu_operator_cost = 0.0025 # same scale as above
300
+ #parallel_tuple_cost = 0.1 # same scale as above
301
+ #parallel_setup_cost = 1000.0 # same scale as above
302
+ #min_parallel_relation_size = 8MB
303
+ #effective_cache_size = 4GB
251
304
 
252
305
  # - Genetic Query Optimizer -
253
306
 
254
307
  #geqo = on
255
308
  #geqo_threshold = 12
256
- #geqo_effort = 5 # range 1-10
257
- #geqo_pool_size = 0 # selects default based on effort
258
- #geqo_generations = 0 # selects default based on effort
259
- #geqo_selection_bias = 2.0 # range 1.5-2.0
260
- #geqo_seed = 0.0 # range 0.0-1.0
309
+ #geqo_effort = 5 # range 1-10
310
+ #geqo_pool_size = 0 # selects default based on effort
311
+ #geqo_generations = 0 # selects default based on effort
312
+ #geqo_selection_bias = 2.0 # range 1.5-2.0
313
+ #geqo_seed = 0.0 # range 0.0-1.0
261
314
 
262
315
  # - Other Planner Options -
263
316
 
264
- #default_statistics_target = 100 # range 1-10000
265
- #constraint_exclusion = partition # on, off, or partition
266
- #cursor_tuple_fraction = 0.1 # range 0.0-1.0
317
+ #default_statistics_target = 100 # range 1-10000
318
+ #constraint_exclusion = partition # on, off, or partition
319
+ #cursor_tuple_fraction = 0.1 # range 0.0-1.0
267
320
  #from_collapse_limit = 8
268
- #join_collapse_limit = 8 # 1 disables collapsing of explicit
269
- # JOIN clauses
321
+ #join_collapse_limit = 8 # 1 disables collapsing of explicit
322
+ # JOIN clauses
323
+ #force_parallel_mode = off
270
324
 
271
325
 
272
326
  #------------------------------------------------------------------------------
@@ -275,93 +329,92 @@ effective_cache_size = 8GB # 50% memory
275
329
 
276
330
  # - Where to Log -
277
331
 
278
- #log_destination = 'stderr' # Valid values are combinations of
279
- # stderr, csvlog, syslog, and eventlog,
280
- # depending on platform. csvlog
281
- # requires logging_collector to be on.
332
+ #log_destination = 'stderr' # Valid values are combinations of
333
+ # stderr, csvlog, syslog, and eventlog,
334
+ # depending on platform. csvlog
335
+ # requires logging_collector to be on.
282
336
 
283
337
  # This is used when logging to stderr:
284
- #logging_collector = off # Enable capturing of stderr and csvlog
285
- # into log files. Required to be on for
286
- # csvlogs.
287
- # (change requires restart)
338
+ #logging_collector = off # Enable capturing of stderr and csvlog
339
+ # into log files. Required to be on for
340
+ # csvlogs.
341
+ # (change requires restart)
288
342
 
289
343
  # These are only used if logging_collector is on:
290
- #log_directory = 'pg_log' # directory where log files are written,
291
- # can be absolute or relative to PGDATA
292
- #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
293
- # can include strftime() escapes
294
- #log_file_mode = 0600 # creation mode for log files,
295
- # begin with 0 to use octal notation
296
- #log_truncate_on_rotation = off # If on, an existing log file with the
297
- # same name as the new log file will be
298
- # truncated rather than appended to.
299
- # But such truncation only occurs on
300
- # time-driven rotation, not on restarts
301
- # or size-driven rotation. Default is
302
- # off, meaning append to existing files
303
- # in all cases.
304
- #log_rotation_age = 1d # Automatic rotation of logfiles will
305
- # happen after that time. 0 disables.
306
- #log_rotation_size = 10MB # Automatic rotation of logfiles will
307
- # happen after that much log output.
308
- # 0 disables.
344
+ #log_directory = 'pg_log' # directory where log files are written,
345
+ # can be absolute or relative to PGDATA
346
+ #log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
347
+ # can include strftime() escapes
348
+ #log_file_mode = 0600 # creation mode for log files,
349
+ # begin with 0 to use octal notation
350
+ #log_truncate_on_rotation = off # If on, an existing log file with the
351
+ # same name as the new log file will be
352
+ # truncated rather than appended to.
353
+ # But such truncation only occurs on
354
+ # time-driven rotation, not on restarts
355
+ # or size-driven rotation. Default is
356
+ # off, meaning append to existing files
357
+ # in all cases.
358
+ #log_rotation_age = 1d # Automatic rotation of logfiles will
359
+ # happen after that time. 0 disables.
360
+ #log_rotation_size = 10MB # Automatic rotation of logfiles will
361
+ # happen after that much log output.
362
+ # 0 disables.
309
363
 
310
364
  # These are relevant when logging to syslog:
311
365
  #syslog_facility = 'LOCAL0'
312
366
  #syslog_ident = 'postgres'
367
+ #syslog_sequence_numbers = on
368
+ #syslog_split_messages = on
313
369
 
314
- #silent_mode = off # Run server silently.
315
- # DO NOT USE without syslog or
316
- # logging_collector
317
- # (change requires restart)
318
-
370
+ # This is only relevant when logging to eventlog (win32):
371
+ #event_source = 'PostgreSQL'
319
372
 
320
373
  # - When to Log -
321
374
 
322
- #client_min_messages = notice # values in order of decreasing detail:
323
- # debug5
324
- # debug4
325
- # debug3
326
- # debug2
327
- # debug1
328
- # log
329
- # notice
330
- # warning
331
- # error
332
-
333
- #log_min_messages = warning # values in order of decreasing detail:
334
- # debug5
335
- # debug4
336
- # debug3
337
- # debug2
338
- # debug1
339
- # info
340
- # notice
341
- # warning
342
- # error
343
- # log
344
- # fatal
345
- # panic
346
-
347
- #log_min_error_statement = error # values in order of decreasing detail:
348
- # debug5
349
- # debug4
350
- # debug3
351
- # debug2
352
- # debug1
353
- # info
354
- # notice
355
- # warning
356
- # error
357
- # log
358
- # fatal
359
- # panic (effectively off)
360
-
361
- #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
362
- # and their durations, > 0 logs only
363
- # statements running at least this number
364
- # of milliseconds
375
+ #client_min_messages = notice # values in order of decreasing detail:
376
+ # debug5
377
+ # debug4
378
+ # debug3
379
+ # debug2
380
+ # debug1
381
+ # log
382
+ # notice
383
+ # warning
384
+ # error
385
+
386
+ #log_min_messages = warning # values in order of decreasing detail:
387
+ # debug5
388
+ # debug4
389
+ # debug3
390
+ # debug2
391
+ # debug1
392
+ # info
393
+ # notice
394
+ # warning
395
+ # error
396
+ # log
397
+ # fatal
398
+ # panic
399
+
400
+ #log_min_error_statement = error # values in order of decreasing detail:
401
+ # debug5
402
+ # debug4
403
+ # debug3
404
+ # debug2
405
+ # debug1
406
+ # info
407
+ # notice
408
+ # warning
409
+ # error
410
+ # log
411
+ # fatal
412
+ # panic (effectively off)
413
+
414
+ #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements
415
+ # and their durations, > 0 logs only
416
+ # statements running at least this number
417
+ # of milliseconds
365
418
 
366
419
 
367
420
  # - What to Log -
@@ -374,33 +427,43 @@ effective_cache_size = 8GB # 50% memory
374
427
  #log_connections = off
375
428
  #log_disconnections = off
376
429
  #log_duration = off
377
- #log_error_verbosity = default # terse, default, or verbose messages
430
+ #log_error_verbosity = default # terse, default, or verbose messages
378
431
  #log_hostname = off
379
- log_line_prefix = '%t ' # special values:
380
- # %a = application name
381
- # %u = user name
382
- # %d = database name
383
- # %r = remote host and port
384
- # %h = remote host
385
- # %p = process ID
386
- # %t = timestamp without milliseconds
387
- # %m = timestamp with milliseconds
388
- # %i = command tag
389
- # %e = SQL state
390
- # %c = session ID
391
- # %l = session line number
392
- # %s = session start timestamp
393
- # %v = virtual transaction ID
394
- # %x = transaction ID (0 if none)
395
- # %q = stop here in non-session
396
- # processes
397
- # %% = '%'
398
- #log_lock_waits = off # log lock waits >= deadlock_timeout
399
- #log_statement = 'none' # none, ddl, mod, all
400
- #log_temp_files = -1 # log temporary files equal or larger
401
- # than the specified size in kilobytes;
402
- # -1 disables, 0 logs all temp files
403
- #log_timezone = '(defaults to server environment setting)'
432
+ log_line_prefix = '%m [%p] %q%u@%d ' # special values:
433
+ # %a = application name
434
+ # %u = user name
435
+ # %d = database name
436
+ # %r = remote host and port
437
+ # %h = remote host
438
+ # %p = process ID
439
+ # %t = timestamp without milliseconds
440
+ # %m = timestamp with milliseconds
441
+ # %n = timestamp with milliseconds (as a Unix epoch)
442
+ # %i = command tag
443
+ # %e = SQL state
444
+ # %c = session ID
445
+ # %l = session line number
446
+ # %s = session start timestamp
447
+ # %v = virtual transaction ID
448
+ # %x = transaction ID (0 if none)
449
+ # %q = stop here in non-session
450
+ # processes
451
+ # %% = '%'
452
+ # e.g. '<%u%%%d> '
453
+ #log_lock_waits = off # log lock waits >= deadlock_timeout
454
+ #log_statement = 'none' # none, ddl, mod, all
455
+ #log_replication_commands = off
456
+ #log_temp_files = -1 # log temporary files equal or larger
457
+ # than the specified size in kilobytes;
458
+ # -1 disables, 0 logs all temp files
459
+ log_timezone = 'UTC'
460
+
461
+
462
+ # - Process Title -
463
+
464
+ cluster_name = '9.6/main' # added to process titles if nonempty
465
+ # (change requires restart)
466
+ #update_process_title = on
404
467
 
405
468
 
406
469
  #------------------------------------------------------------------------------
@@ -411,10 +474,10 @@ log_line_prefix = '%t ' # special values:
411
474
 
412
475
  #track_activities = on
413
476
  #track_counts = on
414
- #track_functions = none # none, pl, all
415
- #track_activity_query_size = 1024 # (change requires restart)
416
- #update_process_title = on
417
- #stats_temp_directory = 'pg_stat_tmp'
477
+ #track_io_timing = off
478
+ #track_functions = none # none, pl, all
479
+ #track_activity_query_size = 1024 # (change requires restart)
480
+ stats_temp_directory = '/var/run/postgresql/9.6-main.pg_stat_tmp'
418
481
 
419
482
 
420
483
  # - Statistics Monitoring -
@@ -429,29 +492,32 @@ log_line_prefix = '%t ' # special values:
429
492
  # AUTOVACUUM PARAMETERS
430
493
  #------------------------------------------------------------------------------
431
494
 
432
- #autovacuum = on # Enable autovacuum subprocess? 'on'
433
- # requires track_counts to also be on.
434
- #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
435
- # their durations, > 0 logs only
436
- # actions running at least this number
437
- # of milliseconds.
438
- #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
439
- # (change requires restart)
440
- #autovacuum_naptime = 1min # time between autovacuum runs
441
- #autovacuum_vacuum_threshold = 50 # min number of row updates before
442
- # vacuum
443
- #autovacuum_analyze_threshold = 50 # min number of row updates before
444
- # analyze
445
- #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
446
- #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
447
- #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
448
- # (change requires restart)
449
- #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
450
- # autovacuum, in milliseconds;
451
- # -1 means use vacuum_cost_delay
452
- #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
453
- # autovacuum, -1 means use
454
- # vacuum_cost_limit
495
+ #autovacuum = on # Enable autovacuum subprocess? 'on'
496
+ # requires track_counts to also be on.
497
+ #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and
498
+ # their durations, > 0 logs only
499
+ # actions running at least this number
500
+ # of milliseconds.
501
+ #autovacuum_max_workers = 3 # max number of autovacuum subprocesses
502
+ # (change requires restart)
503
+ #autovacuum_naptime = 1min # time between autovacuum runs
504
+ #autovacuum_vacuum_threshold = 50 # min number of row updates before
505
+ # vacuum
506
+ #autovacuum_analyze_threshold = 50 # min number of row updates before
507
+ # analyze
508
+ #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum
509
+ #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze
510
+ #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum
511
+ # (change requires restart)
512
+ #autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age
513
+ # before forced vacuum
514
+ # (change requires restart)
515
+ #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for
516
+ # autovacuum, in milliseconds;
517
+ # -1 means use vacuum_cost_delay
518
+ #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for
519
+ # autovacuum, -1 means use
520
+ # vacuum_cost_limit
455
521
 
456
522
 
457
523
  #------------------------------------------------------------------------------
@@ -460,44 +526,50 @@ log_line_prefix = '%t ' # special values:
460
526
 
461
527
  # - Statement Behavior -
462
528
 
463
- #search_path = '"$user",public' # schema names
464
- #default_tablespace = '' # a tablespace name, '' uses the default
465
- #temp_tablespaces = '' # a list of tablespace names, '' uses
466
- # only default tablespace
529
+ #search_path = '"$user", public' # schema names
530
+ #default_tablespace = '' # a tablespace name, '' uses the default
531
+ #temp_tablespaces = '' # a list of tablespace names, '' uses
532
+ # only default tablespace
467
533
  #check_function_bodies = on
468
534
  #default_transaction_isolation = 'read committed'
469
535
  #default_transaction_read_only = off
470
536
  #default_transaction_deferrable = off
471
537
  #session_replication_role = 'origin'
472
- #statement_timeout = 0 # in milliseconds, 0 is disabled
538
+ #statement_timeout = 0 # in milliseconds, 0 is disabled
539
+ #lock_timeout = 0 # in milliseconds, 0 is disabled
540
+ #idle_in_transaction_session_timeout = 0 # in milliseconds, 0 is disabled
473
541
  #vacuum_freeze_min_age = 50000000
474
542
  #vacuum_freeze_table_age = 150000000
475
- #bytea_output = 'hex' # hex, escape
543
+ #vacuum_multixact_freeze_min_age = 5000000
544
+ #vacuum_multixact_freeze_table_age = 150000000
545
+ #bytea_output = 'hex' # hex, escape
476
546
  #xmlbinary = 'base64'
477
547
  #xmloption = 'content'
548
+ #gin_fuzzy_search_limit = 0
549
+ #gin_pending_list_limit = 4MB
478
550
 
479
551
  # - Locale and Formatting -
480
552
 
481
553
  datestyle = 'iso, mdy'
482
554
  #intervalstyle = 'postgres'
483
- #timezone = '(defaults to server environment setting)'
555
+ timezone = 'UTC'
484
556
  #timezone_abbreviations = 'Default' # Select the set of available time zone
485
- # abbreviations. Currently, there are
486
- # Default
487
- # Australia
488
- # India
489
- # You can create your own file in
490
- # share/timezonesets/.
491
- #extra_float_digits = 0 # min -15, max 3
492
- #client_encoding = sql_ascii # actually, defaults to database
493
- # encoding
557
+ # abbreviations. Currently, there are
558
+ # Default
559
+ # Australia (historical usage)
560
+ # India
561
+ # You can create your own file in
562
+ # share/timezonesets/.
563
+ #extra_float_digits = 0 # min -15, max 3
564
+ #client_encoding = sql_ascii # actually, defaults to database
565
+ # encoding
494
566
 
495
567
  # These settings are initialized by initdb, but they can be changed.
496
- lc_messages = 'en_US.UTF-8' # locale for system error message
497
- # strings
498
- lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
499
- lc_numeric = 'en_US.UTF-8' # locale for number formatting
500
- lc_time = 'en_US.UTF-8' # locale for time formatting
568
+ lc_messages = 'en_US.UTF-8' # locale for system error message
569
+ # strings
570
+ lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
571
+ lc_numeric = 'en_US.UTF-8' # locale for number formatting
572
+ lc_time = 'en_US.UTF-8' # locale for time formatting
501
573
 
502
574
  # default configuration for text search
503
575
  default_text_search_config = 'pg_catalog.english'
@@ -506,6 +578,7 @@ default_text_search_config = 'pg_catalog.english'
506
578
 
507
579
  #dynamic_library_path = '$libdir'
508
580
  #local_preload_libraries = ''
581
+ #session_preload_libraries = ''
509
582
 
510
583
 
511
584
  #------------------------------------------------------------------------------
@@ -513,13 +586,11 @@ default_text_search_config = 'pg_catalog.english'
513
586
  #------------------------------------------------------------------------------
514
587
 
515
588
  #deadlock_timeout = 1s
516
- #max_locks_per_transaction = 64 # min 10
517
- # (change requires restart)
518
- # Note: Each lock table slot uses ~270 bytes of shared memory, and there are
519
- # max_locks_per_transaction * (max_connections + max_prepared_transactions)
520
- # lock table slots.
521
- #max_pred_locks_per_transaction = 64 # min 10
522
- # (change requires restart)
589
+ #max_locks_per_transaction = 64 # min 10
590
+ # (change requires restart)
591
+ #max_pred_locks_per_transaction = 64 # min 10
592
+ # (change requires restart)
593
+
523
594
 
524
595
  #------------------------------------------------------------------------------
525
596
  # VERSION/PLATFORM COMPATIBILITY
@@ -528,10 +599,11 @@ default_text_search_config = 'pg_catalog.english'
528
599
  # - Previous PostgreSQL Versions -
529
600
 
530
601
  #array_nulls = on
531
- #backslash_quote = safe_encoding # on, off, or safe_encoding
602
+ #backslash_quote = safe_encoding # on, off, or safe_encoding
532
603
  #default_with_oids = off
533
604
  #escape_string_warning = on
534
605
  #lo_compat_privileges = off
606
+ #operator_precedence_warning = off
535
607
  #quote_all_identifiers = off
536
608
  #sql_inheritance = on
537
609
  #standard_conforming_strings = on
@@ -546,12 +618,25 @@ default_text_search_config = 'pg_catalog.english'
546
618
  # ERROR HANDLING
547
619
  #------------------------------------------------------------------------------
548
620
 
549
- #exit_on_error = off # terminate session on any error?
550
- #restart_after_crash = on # reinitialize after backend crash?
621
+ #exit_on_error = off # terminate session on any error?
622
+ #restart_after_crash = on # reinitialize after backend crash?
623
+
624
+
625
+ #------------------------------------------------------------------------------
626
+ # CONFIG FILE INCLUDES
627
+ #------------------------------------------------------------------------------
628
+
629
+ # These options allow settings to be loaded from files other than the
630
+ # default postgresql.conf.
631
+
632
+ #include_dir = 'conf.d' # include files ending in '.conf' from
633
+ # directory 'conf.d'
634
+ #include_if_exists = 'exists.conf' # include file only if it exists
635
+ #include = 'special.conf' # include file
551
636
 
552
637
 
553
638
  #------------------------------------------------------------------------------
554
639
  # CUSTOMIZED OPTIONS
555
640
  #------------------------------------------------------------------------------
556
641
 
557
- #custom_variable_classes = '' # list of custom variable class names
642
+ # Add settings for extensions here