pvcglue 0.1.39 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/README.md +12 -3
- data/bin/pvc +4 -2
- data/lib/pvcglue.rb +106 -21
- data/lib/pvcglue/bootstrap.rb +1 -1
- data/lib/pvcglue/cli.rb +28 -17
- data/lib/pvcglue/cloud.rb +243 -56
- data/lib/pvcglue/configuration.rb +43 -5
- data/lib/pvcglue/connection.rb +236 -0
- data/lib/pvcglue/custom_hashie.rb +3 -0
- data/lib/pvcglue/db.rb +19 -13
- data/lib/pvcglue/digital_ocean.rb +21 -0
- data/lib/pvcglue/env.rb +52 -28
- data/lib/pvcglue/manager.rb +38 -25
- data/lib/pvcglue/minion.rb +182 -0
- data/lib/pvcglue/nodes.rb +1 -1
- data/lib/pvcglue/{packages → old_packages}/bootstrap.rb +15 -15
- data/lib/pvcglue/{packages → old_packages}/env.rb +8 -8
- data/lib/pvcglue/old_packages/firewall.rb +48 -0
- data/lib/pvcglue/old_packages/manager.rb +116 -0
- data/lib/pvcglue/{packages → old_packages}/monit-bootstrap.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/monit-web.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/nginx.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/nodejs.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/passenger.rb +0 -0
- data/lib/pvcglue/old_packages/postgresql.rb +10 -0
- data/lib/pvcglue/{packages → old_packages}/role_db.rb +9 -9
- data/lib/pvcglue/{packages → old_packages}/role_lb.rb +6 -6
- data/lib/pvcglue/{packages → old_packages}/role_memcached.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/role_redis.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/role_web.rb +9 -9
- data/lib/pvcglue/old_packages/rvm.rb +78 -0
- data/lib/pvcglue/{packages → old_packages}/timezone.rb +0 -0
- data/lib/pvcglue/{packages → old_packages}/ubuntu.rb +0 -0
- data/lib/pvcglue/packages.rb +192 -71
- data/lib/pvcglue/packages/apt.rb +74 -0
- data/lib/pvcglue/packages/apt_repos.rb +48 -0
- data/lib/pvcglue/packages/apt_update.rb +18 -0
- data/lib/pvcglue/packages/apt_upgrade.rb +20 -0
- data/lib/pvcglue/packages/authorized_keys.rb +33 -0
- data/lib/pvcglue/packages/bundler.rb +14 -0
- data/lib/pvcglue/packages/dir_base.rb +16 -0
- data/lib/pvcglue/packages/dir_shared.rb +16 -0
- data/lib/pvcglue/packages/firewall.rb +30 -46
- data/lib/pvcglue/packages/load_balancer.rb +71 -0
- data/lib/pvcglue/packages/maintenance_mode.rb +28 -0
- data/lib/pvcglue/packages/manager.rb +101 -99
- data/lib/pvcglue/packages/postgresql.rb +36 -8
- data/lib/pvcglue/packages/roles.rb +23 -0
- data/lib/pvcglue/packages/ruby.rb +13 -0
- data/lib/pvcglue/packages/rvm.rb +18 -71
- data/lib/pvcglue/packages/secrets.rb +36 -0
- data/lib/pvcglue/packages/ssh_key_check.rb +11 -0
- data/lib/pvcglue/packages/ssl.rb +45 -0
- data/lib/pvcglue/packages/ssl_acme.rb +29 -0
- data/lib/pvcglue/packages/swap.rb +14 -0
- data/lib/pvcglue/packages/unattended_upgrades.rb +20 -0
- data/lib/pvcglue/packages/users.rb +20 -0
- data/lib/pvcglue/packages/web.rb +50 -0
- data/lib/pvcglue/stack.rb +166 -0
- data/lib/pvcglue/templates/50unattended-upgrades.erb +63 -0
- data/lib/pvcglue/templates/capfile.erb +4 -1
- data/lib/pvcglue/templates/deploy.rb.erb +3 -2
- data/lib/pvcglue/templates/lb.sites-enabled.erb +15 -9
- data/lib/pvcglue/templates/letsencrypt-webroot.erb +3 -0
- data/lib/pvcglue/templates/pg_hba.conf.erb +1 -2
- data/lib/pvcglue/templates/postgresql.conf.erb +376 -291
- data/lib/pvcglue/templates/stage-deploy.rb.erb +2 -2
- data/lib/pvcglue/templates/web.bashrc.erb +16 -5
- data/lib/pvcglue/templates/web.nginx.conf.erb +1 -1
- data/lib/pvcglue/templates/web.sites-enabled.erb +1 -1
- data/lib/pvcglue/version.rb +1 -1
- data/pvcglue.gemspec +17 -12
- 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.
|
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
|
-
|
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.
|
40
|
+
raise "Unsupported SSL option '#{Pvcglue.cloud.ssl_mode_override}'" %>
|
39
41
|
<% end %>
|
40
42
|
}
|
41
43
|
|
42
|
-
<% unless Pvcglue.cloud.
|
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.
|
57
|
+
<% case Pvcglue.cloud.ssl_mode_override
|
56
58
|
when :none %>
|
57
|
-
|
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.
|
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 / {
|
@@ -43,7 +43,7 @@
|
|
43
43
|
# directly connected to.
|
44
44
|
#
|
45
45
|
# METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
|
46
|
-
# "
|
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
|
-
#
|
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.
|
42
|
-
|
43
|
-
hba_file = '/etc/postgresql/9.
|
44
|
-
|
45
|
-
ident_file = '/etc/postgresql/9.
|
46
|
-
|
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.
|
50
|
-
|
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 = '*'
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
port = 5432
|
64
|
-
max_connections = 100
|
65
|
-
#
|
66
|
-
|
67
|
-
#
|
68
|
-
|
69
|
-
#
|
70
|
-
#
|
71
|
-
|
72
|
-
#
|
73
|
-
|
74
|
-
#
|
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
|
80
|
-
ssl = true
|
81
|
-
#ssl_ciphers = '
|
82
|
-
|
83
|
-
#
|
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
|
-
#
|
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
|
96
|
-
|
97
|
-
#tcp_keepalives_interval = 0
|
98
|
-
|
99
|
-
#tcp_keepalives_count = 0
|
100
|
-
|
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 =
|
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
|
-
|
112
|
-
#
|
113
|
-
#
|
114
|
-
|
115
|
-
#
|
116
|
-
#
|
117
|
-
#
|
118
|
-
# actively intend to use prepared transactions.
|
119
|
-
#work_mem =
|
120
|
-
#maintenance_work_mem =
|
121
|
-
#
|
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
|
126
|
-
|
127
|
-
#shared_preload_libraries = ''
|
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 =
|
132
|
-
#vacuum_cost_page_hit = 1
|
133
|
-
#vacuum_cost_page_miss = 10
|
134
|
-
#vacuum_cost_page_dirty = 20
|
135
|
-
#vacuum_cost_limit = 200
|
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
|
140
|
-
#bgwriter_lru_maxpages = 100
|
141
|
-
#bgwriter_lru_multiplier = 2.0
|
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
|
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
|
155
|
-
|
156
|
-
#fsync = on
|
157
|
-
#
|
158
|
-
#
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
#
|
166
|
-
#
|
167
|
-
|
168
|
-
#
|
169
|
-
|
170
|
-
#
|
171
|
-
#
|
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
|
-
#
|
176
|
-
#
|
177
|
-
#
|
178
|
-
#
|
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
|
183
|
-
|
184
|
-
#archive_command = ''
|
185
|
-
#
|
186
|
-
|
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
|
-
#
|
198
|
-
|
199
|
-
#
|
200
|
-
#
|
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
|
212
|
-
|
213
|
-
#max_standby_archive_delay = 30s
|
214
|
-
|
215
|
-
|
216
|
-
#max_standby_streaming_delay = 30s
|
217
|
-
|
218
|
-
|
219
|
-
#wal_receiver_status_interval = 10s
|
220
|
-
|
221
|
-
#hot_standby_feedback = off
|
222
|
-
|
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
|
245
|
-
#random_page_cost = 4.0
|
246
|
-
#cpu_tuple_cost = 0.01
|
247
|
-
#cpu_index_tuple_cost = 0.005
|
248
|
-
#cpu_operator_cost = 0.0025
|
249
|
-
#
|
250
|
-
|
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
|
257
|
-
#geqo_pool_size = 0
|
258
|
-
#geqo_generations = 0
|
259
|
-
#geqo_selection_bias = 2.0
|
260
|
-
#geqo_seed = 0.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
|
265
|
-
#constraint_exclusion = partition
|
266
|
-
#cursor_tuple_fraction = 0.1
|
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
|
269
|
-
|
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'
|
279
|
-
|
280
|
-
|
281
|
-
|
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
|
285
|
-
|
286
|
-
|
287
|
-
|
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'
|
291
|
-
|
292
|
-
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'
|
293
|
-
|
294
|
-
#log_file_mode = 0600
|
295
|
-
|
296
|
-
#log_truncate_on_rotation = off
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
#log_rotation_age = 1d
|
305
|
-
|
306
|
-
#log_rotation_size = 10MB
|
307
|
-
|
308
|
-
|
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
|
-
#
|
315
|
-
|
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
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
#log_min_messages = warning
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
#log_min_error_statement = error
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
#log_min_duration_statement = -1
|
362
|
-
|
363
|
-
|
364
|
-
|
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
|
430
|
+
#log_error_verbosity = default # terse, default, or verbose messages
|
378
431
|
#log_hostname = off
|
379
|
-
log_line_prefix = '%
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
#
|
399
|
-
#
|
400
|
-
#
|
401
|
-
|
402
|
-
|
403
|
-
#
|
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
|
-
#
|
415
|
-
#
|
416
|
-
#
|
417
|
-
|
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
|
433
|
-
|
434
|
-
#log_autovacuum_min_duration = -1
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
#autovacuum_max_workers = 3
|
439
|
-
|
440
|
-
#autovacuum_naptime = 1min
|
441
|
-
#autovacuum_vacuum_threshold = 50
|
442
|
-
|
443
|
-
#autovacuum_analyze_threshold = 50
|
444
|
-
|
445
|
-
#autovacuum_vacuum_scale_factor = 0.2
|
446
|
-
#autovacuum_analyze_scale_factor = 0.1
|
447
|
-
#autovacuum_freeze_max_age = 200000000
|
448
|
-
|
449
|
-
#
|
450
|
-
|
451
|
-
|
452
|
-
#
|
453
|
-
|
454
|
-
|
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'
|
464
|
-
#default_tablespace = ''
|
465
|
-
#temp_tablespaces = ''
|
466
|
-
|
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
|
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
|
-
#
|
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
|
-
|
555
|
+
timezone = 'UTC'
|
484
556
|
#timezone_abbreviations = 'Default' # Select the set of available time zone
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
#extra_float_digits = 0
|
492
|
-
#client_encoding = sql_ascii
|
493
|
-
|
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'
|
497
|
-
|
498
|
-
lc_monetary = 'en_US.UTF-8'
|
499
|
-
lc_numeric = 'en_US.UTF-8'
|
500
|
-
lc_time = 'en_US.UTF-8'
|
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
|
517
|
-
|
518
|
-
#
|
519
|
-
#
|
520
|
-
|
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
|
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
|
550
|
-
#restart_after_crash = on
|
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
|
-
#
|
642
|
+
# Add settings for extensions here
|