syncwrap 2.10.0 → 2.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +13 -1
  3. data/README.rdoc +16 -28
  4. data/bin/syncwrap +1 -1
  5. data/lib/syncwrap.rb +1 -1
  6. data/lib/syncwrap/amazon_ec2.rb +1 -1
  7. data/lib/syncwrap/amazon_ws.rb +1 -1
  8. data/lib/syncwrap/base.rb +2 -2
  9. data/lib/syncwrap/change_key_listener.rb +1 -1
  10. data/lib/syncwrap/cli.rb +1 -1
  11. data/lib/syncwrap/component.rb +1 -1
  12. data/lib/syncwrap/components/amazon_linux.rb +14 -12
  13. data/lib/syncwrap/components/arch.rb +1 -1
  14. data/lib/syncwrap/components/bundle.rb +1 -1
  15. data/lib/syncwrap/components/bundled_iyyov_daemon.rb +1 -1
  16. data/lib/syncwrap/components/bundler_gem.rb +1 -1
  17. data/lib/syncwrap/components/centos.rb +1 -1
  18. data/lib/syncwrap/components/change_guard.rb +1 -1
  19. data/lib/syncwrap/components/commercial_jdk.rb +1 -1
  20. data/lib/syncwrap/components/cruby_vm.rb +30 -26
  21. data/lib/syncwrap/components/debian.rb +1 -1
  22. data/lib/syncwrap/components/etc_hosts.rb +1 -1
  23. data/lib/syncwrap/components/geminabox.rb +1 -1
  24. data/lib/syncwrap/components/hashdot.rb +1 -1
  25. data/lib/syncwrap/components/iyyov.rb +1 -1
  26. data/lib/syncwrap/components/iyyov_daemon.rb +1 -1
  27. data/lib/syncwrap/components/jruby_vm.rb +15 -14
  28. data/lib/syncwrap/components/lvm_cache.rb +1 -1
  29. data/lib/syncwrap/components/mdraid.rb +1 -1
  30. data/lib/syncwrap/components/network.rb +1 -1
  31. data/lib/syncwrap/components/open_jdk.rb +1 -1
  32. data/lib/syncwrap/components/postgresql.rb +39 -17
  33. data/lib/syncwrap/components/puma.rb +1 -1
  34. data/lib/syncwrap/components/qpid.rb +1 -1
  35. data/lib/syncwrap/components/rake_gem.rb +1 -1
  36. data/lib/syncwrap/components/rhel.rb +1 -1
  37. data/lib/syncwrap/components/run_user.rb +1 -1
  38. data/lib/syncwrap/components/source_tree.rb +1 -1
  39. data/lib/syncwrap/components/tarpit_gem.rb +1 -1
  40. data/lib/syncwrap/components/time_checker.rb +1 -1
  41. data/lib/syncwrap/components/ubuntu.rb +2 -1
  42. data/lib/syncwrap/components/users.rb +1 -1
  43. data/lib/syncwrap/context.rb +1 -1
  44. data/lib/syncwrap/distro.rb +1 -1
  45. data/lib/syncwrap/formatter.rb +1 -1
  46. data/lib/syncwrap/git_help.rb +1 -1
  47. data/lib/syncwrap/hash_support.rb +1 -1
  48. data/lib/syncwrap/host.rb +1 -1
  49. data/lib/syncwrap/main.rb +1 -1
  50. data/lib/syncwrap/path_util.rb +1 -1
  51. data/lib/syncwrap/rsync.rb +1 -1
  52. data/lib/syncwrap/ruby_support.rb +1 -1
  53. data/lib/syncwrap/shell.rb +1 -1
  54. data/lib/syncwrap/sudoers.rb +1 -1
  55. data/lib/syncwrap/systemd.rb +1 -1
  56. data/lib/syncwrap/systemd_service.rb +1 -1
  57. data/lib/syncwrap/user_data.rb +1 -1
  58. data/lib/syncwrap/version_support.rb +1 -1
  59. data/lib/syncwrap/zone_balancer.rb +1 -1
  60. data/sync/postgresql/postgresql.conf.erb +52 -37
  61. data/test/setup.rb +1 -1
  62. data/test/test_components.rb +4 -2
  63. data/test/test_context.rb +1 -1
  64. data/test/test_context_rput.rb +1 -1
  65. data/test/test_rsync.rb +1 -1
  66. data/test/test_shell.rb +1 -1
  67. data/test/test_space.rb +1 -1
  68. data/test/test_space_main.rb +1 -1
  69. data/test/test_version_support.rb +1 -1
  70. data/test/test_zone_balancer.rb +1 -1
  71. metadata +3 -3
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -30,54 +30,75 @@ module SyncWrap
30
30
  # Host component dependencies: <Distro>
31
31
  #
32
32
  # Currently provided (sync/postgresql) configuration is \PostgreSQL
33
- # 9.x compatible. You will need to provide your own complete
34
- # configuration for any other versions.
33
+ # 9.4+ and 10+ compatible. You will need to provide your own
34
+ # complete configuration for any other versions.
35
35
  #
36
36
  # Most distros provide reasonably updated \PostgreSQL 9.x in more
37
37
  # recent releases:
38
38
  #
39
- # * RHEL, CentOS 6: 8.4
40
39
  # * RHEL, CentOS 7: 9.2
41
- # * AmazonLinux 2013.03: 8.4 9.2
42
- # * AmazonLinux 2014.09: 8.4 9.2 9.3
43
40
  # * AmazonLinux 2015.09: 9.2 9.3 9.4
44
- # * Debian 7: 9.1
41
+ # * AmazonLinux 2017.09: 9.4 9.5 9.6
45
42
  # * Debian 8: 9.4
43
+ # * Debian 9: 9.6
46
44
  # * Ubuntu 14: 9.3
45
+ # * Ubuntu 16: 9.5
47
46
  #
48
47
  # The latest stable and beta packages can also be obtained via the
49
48
  # \PostgreSQL {Yum Repo}[http://yum.postgresql.org] or
50
49
  # {Apt Repo}[http://wiki.postgresql.org/wiki/Apt]. Create your own
51
50
  # repo component to install these repo's, then configure the
52
51
  # \PostgreSQL component accordingly for #pg_version,
53
- # #pg_default_data_dir, #package_names.
52
+ # #pg_default_data_dir, and #package_names, etc.
54
53
  #
55
54
  class PostgreSQL < Component
56
55
  include VersionSupport
57
56
 
58
- # \PostgreSQL _MAJOR.MINOR_ version to install. Since there are
59
- # multiple versions in use even for _default_ system packages across
60
- # distros, this should be set the same as the version that will
61
- # be installed via #package_names.
62
- # (Default: guess based on distro/version or '9.1')
57
+ # \PostgreSQL _MAJOR.MINOR_ (e.g. '9.6') or _MAJOR_ (e.g. '10')
58
+ # version to install, not including the patch release number. As
59
+ # of \PostgreSQL 10, this is the single value '10'. Since there are
60
+ # multiple versions in use even for _default_ system packages
61
+ # across distros, this should be set the same as the version that
62
+ # will be installed via #package_names. (Default: guess based on
63
+ # distro/version or '9.1')
63
64
  attr_writer :pg_version
64
65
 
65
66
  def pg_version
66
67
  ( @pg_version ||
67
68
  ( case distro
68
69
  when AmazonLinux
69
- '9.2' if version_gte?( amazon_version, [2013,3] )
70
+ if version_gte?( amazon_version, [2017,9] )
71
+ '9.6'
72
+ elsif version_gte?( amazon_version, [2015,9] )
73
+ '9.4'
74
+ elsif version_gte?( amazon_version, [2013,3] )
75
+ '9.2'
76
+ end
70
77
  when RHEL
71
78
  '9.2' if version_gte?( rhel_version, [7] )
72
79
  when Ubuntu
73
- '9.3' if version_gte?( ubuntu_version, [14,4] )
80
+ if version_gte?( ubuntu_version, [16,4] )
81
+ '9.5'
82
+ elsif version_gte?( ubuntu_version, [14,4] )
83
+ '9.3'
84
+ end
74
85
  when Debian
75
- '9.4' if version_gte?( debian_version, [8] )
86
+ if version_gte?( debian_version, [9] )
87
+ '9.6'
88
+ elsif version_gte?( debian_version, [8] )
89
+ '9.4'
90
+ end
76
91
  end
77
92
  ) ||
78
93
  '9.1' )
79
94
  end
80
95
 
96
+ # Per #pg_version, but with any '.' decimal separators removed,
97
+ # e.g. '9.6' => '96', '10' => '10'.
98
+ def compact_pg_version
99
+ pg_version.gsub('.','')
100
+ end
101
+
81
102
  # Location of postgresql data (and possibly also config) directory.
82
103
  # (Default: #pg_default_data_dir)
83
104
  attr_writer :pg_data_dir
@@ -136,7 +157,8 @@ module SyncWrap
136
157
  ( @package_names ||
137
158
  ( distro.is_a?( Debian ) && [ "postgresql-#{pg_version}" ] ) ||
138
159
  ( distro.is_a?( AmazonLinux ) &&
139
- ( ( version_gte?( amazon_version, [2014,9] ) && [ "postgresql92-server" ] ) ||
160
+ ( ( version_gte?( amazon_version, [2014,9] ) &&
161
+ [ "postgresql#{compact_pg_version}-server" ] ) ||
140
162
  [ "postgresql9-server" ] ) ) ||
141
163
  [ "postgresql-server" ] )
142
164
  end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -32,6 +32,7 @@ module SyncWrap
32
32
  # an approximation of the LTS lineage.
33
33
  def debian_version
34
34
  super ||
35
+ ( version_gte?( ubuntu_version, [18,4] ) && '10' ) ||
35
36
  ( version_gte?( ubuntu_version, [15,4] ) && '8' ) ||
36
37
  ( version_gte?( ubuntu_version, [14,4] ) && '7' ) ||
37
38
  ( version_gte?( ubuntu_version, [12,4] ) && '6' )
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
data/lib/syncwrap/host.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
data/lib/syncwrap/main.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2011-2017 David Kellum
2
+ # Copyright (c) 2011-2018 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You may
@@ -16,9 +16,9 @@
16
16
  #
17
17
  # This file is read on server startup and when the server receives a SIGHUP
18
18
  # signal. If you edit the file on a running system, you have to SIGHUP the
19
- # server for the changes to take effect, or use "pg_ctl reload". Some
20
- # parameters, which are marked below, require a server shutdown and restart to
21
- # take effect.
19
+ # server for the changes to take effect, run "pg_ctl reload", or execute
20
+ # "SELECT pg_reload_conf()". Some parameters, which are marked below,
21
+ # require a server shutdown and restart to take effect.
22
22
  #
23
23
  # Any parameter can also be given as a command-line option to the server, e.g.,
24
24
  # "postgres -c log_connections=on". Some parameters can be changed at run time
@@ -81,9 +81,7 @@ listen_addresses = '*'
81
81
  #port = 5432 # (change requires restart)
82
82
  max_connections = 100 # (change requires restart)
83
83
  #superuser_reserved_connections = 3 # (change requires restart)
84
- #unix_socket_directory = '/var/run/postgresql' # < 9.3
85
- #unix_socket_directories = '/var/run/postgresql, /tmp'
86
- # comma-separated list of directories (9.3+)
84
+ #unix_socket_directories = '/tmp' # comma-separated list of directories
87
85
  # (change requires restart)
88
86
  #unix_socket_group = '' # (change requires restart)
89
87
  #unix_socket_permissions = 0777 # begin with 0 to use octal notation
@@ -96,16 +94,16 @@ max_connections = 100 # (change requires restart)
96
94
  # - Security and Authentication -
97
95
 
98
96
  #authentication_timeout = 1min # 1s-600s
99
- #ssl = off # (change requires restart)
97
+ #ssl = off
100
98
  #ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
101
- # (change requires restart)
102
- #ssl_prefer_server_ciphers = on # (change requires restart) (9.4+)
103
- #ssl_ecdh_curve = 'prime256v1' # (change requires restart) (9.4+)
104
- #ssl_cert_file = 'server.crt' # (change requires restart)
105
- #ssl_key_file = 'server.key' # (change requires restart)
106
- #ssl_ca_file = '' # (change requires restart)
107
- #ssl_crl_file = '' # (change requires restart)
108
- #password_encryption = on
99
+ #ssl_prefer_server_ciphers = on # (9.4+)
100
+ #ssl_ecdh_curve = 'prime256v1' # (9.4+)
101
+ #ssl_dh_params_file = '' # (10+)
102
+ #ssl_cert_file = 'server.crt'
103
+ #ssl_key_file = 'server.key'
104
+ #ssl_ca_file = ''
105
+ #ssl_crl_file = ''
106
+ #password_encryption = md5 # (on, or 10+: md5 or scram-sha-256)
109
107
  #db_user_namespace = off
110
108
  #row_security = on # (9.5+)
111
109
 
@@ -150,6 +148,7 @@ max_stack_depth = <%= max_stack_depth %> # min 100kB
150
148
  # windows
151
149
  # mmap
152
150
  # use none to disable dynamic shared memory
151
+ # (change requires restart)
153
152
 
154
153
  # - Disk -
155
154
 
@@ -175,15 +174,16 @@ max_stack_depth = <%= max_stack_depth %> # min 100kB
175
174
  #bgwriter_delay = 200ms # 10-10000ms between rounds
176
175
  #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round
177
176
  #bgwriter_lru_multiplier = 2.0 # 0-10.0 multiplier on buffers scanned/round
178
- #bgwriter_flush_after = 0 # measured in pages, 0 disables,
179
- # default is 512kB on linux, 0 otherwise (9.6+)
177
+ #bgwriter_flush_after = 0 # measured in pages, 0 disables (9.6+)
180
178
 
181
179
  # - Asynchronous Behavior -
182
180
 
183
181
  effective_io_concurrency = <%= effective_io_concurrency %>
184
182
  # 1-1000; 0 disables prefetching
185
183
  #max_worker_processes = 8 # (change requires restart, 9.4+)
186
- #max_parallel_workers_per_gather = 0 # taken from max_worker_processes (9.6+)
184
+ #max_parallel_workers_per_gather = 2 # taken from max_parallel_workers (9.6+)
185
+ #max_parallel_workers = 8 # maximum number of max_worker_processes that
186
+ # can be used in parallel queries
187
187
  #old_snapshot_threshold = -1 # 1min-60d; -1 disables; 0 is immediate (9.6+)
188
188
  # (change requires restart)
189
189
  #backend_flush_after = 0 # measured in pages, 0 disables
@@ -194,12 +194,14 @@ effective_io_concurrency = <%= effective_io_concurrency %>
194
194
 
195
195
  # - Settings -
196
196
 
197
- #wal_level = minimal # minimal, archive, hot_standby, or logical
197
+ #wal_level = replica # minimal, archive, hot_standby, or logical
198
198
  # 9.6+: minimal, replica, or logical
199
199
  # (change requires restart)
200
- #fsync = on # turns forced synchronization on or off
200
+ #fsync = on # flush data to disk for crash safety
201
+ # (turning this off can cause
202
+ # unrecoverable data corruption)
201
203
  synchronous_commit = <%= synchronous_commit %> # synchronization level;
202
- # off, local, remote_write, or on
204
+ # off, local, remote_write, remote_apply, or on
203
205
  #wal_sync_method = fsync # the default is the first option
204
206
  # supported by the operating system:
205
207
  # open_datasync
@@ -214,7 +216,7 @@ synchronous_commit = <%= synchronous_commit %> # synchronization level;
214
216
  #wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers
215
217
  # (change requires restart)
216
218
  #wal_writer_delay = 200ms # 1-10000 milliseconds
217
- #wal_writer_flush_after = 1MB # 0 disables (9.6+)
219
+ #wal_writer_flush_after = 1MB # measured in pages, 0 disables (9.6+)
218
220
 
219
221
  commit_delay = <%= commit_delay %> # range 0-100000, in microseconds
220
222
  #commit_siblings = 5 # range 1-1000
@@ -232,8 +234,7 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
232
234
  <% end %>
233
235
  #checkpoint_timeout = 5min # range 30s-1d
234
236
  #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0
235
- #checkpoint_flush_after = 0 # 0 disables,
236
- # default is 256kB on linux, 0 otherwise
237
+ #checkpoint_flush_after = 0 # measured in pages, 0 disables
237
238
  #checkpoint_warning = 30s # 0 disables
238
239
 
239
240
  # - Archiving -
@@ -255,12 +256,11 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
255
256
 
256
257
  # Set these on the master and on any standby that will send replication data.
257
258
 
258
- #max_wal_senders = 0 # max number of walsender processes
259
+ #max_wal_senders = 10 # max number of walsender processes
259
260
  # (change requires restart)
260
261
  #wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables
261
- #replication_timeout = 60s # < 9.3
262
- #wal_sender_timeout = 60s # in milliseconds; 0 disables (9.3+)
263
- #max_replication_slots = 0 # max number of replication slots
262
+ #wal_sender_timeout = 60s # in milliseconds; 0 disables
263
+ #max_replication_slots = 10 # max number of replication slots
264
264
  # (change requires restart) (9.4+)
265
265
  #track_commit_timestamp = off # collect timestamp of transaction commit
266
266
  # (change requires restart) (9.5+)
@@ -270,7 +270,8 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
270
270
  # These settings are ignored on a standby server.
271
271
 
272
272
  #synchronous_standby_names = '' # standby servers that provide sync rep
273
- # comma-separated list of application_name
273
+ # method to choose sync standbys, number of sync standbys,
274
+ # and comma-separated list of application_name
274
275
  # from standby(s); '*' = all
275
276
  #vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed
276
277
 
@@ -278,7 +279,7 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
278
279
 
279
280
  # These settings are ignored on a master server.
280
281
 
281
- #hot_standby = off # "on" allows queries during recovery
282
+ #hot_standby = on # "off" disallows queries during recovery
282
283
  # (change requires restart)
283
284
  #max_standby_archive_delay = 30s # max delay before canceling queries
284
285
  # when reading WAL from archive;
@@ -296,6 +297,14 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
296
297
  #wal_retrieve_retry_interval = 5s # time to wait before retrying to
297
298
  # retrieve WAL after a failed attempt (9.5+)
298
299
 
300
+ # - Subscribers -
301
+
302
+ # These settings are ignored on a publisher.
303
+
304
+ #max_logical_replication_workers = 4 # taken from max_worker_processes
305
+ # (change requires restart)
306
+ #max_sync_workers_per_subscription = 2 # taken from max_logical_replication_workers
307
+
299
308
  #------------------------------------------------------------------------------
300
309
  # QUERY TUNING
301
310
  #------------------------------------------------------------------------------
@@ -323,8 +332,10 @@ checkpoint_segments = <%= checkpoint_segments %> # in logfile segments, min 1, 1
323
332
  #cpu_operator_cost = 0.0025 # same scale as above
324
333
  #parallel_tuple_cost = 0.1 # same scale as above (9.6+)
325
334
  #parallel_setup_cost = 1000.0 # same scale as above (9.6+)
326
- #min_parallel_relation_size = 8MB # (9.6+)
327
- #effective_cache_size = 4GB # (128MB was default < 9.4)
335
+ #min_parallel_relation_size = 8MB # (< 10)
336
+ #min_parallel_table_scan_size = 8MB # (10+)
337
+ #min_parallel_index_scan_size = 512kB # (10+)
338
+ #effective_cache_size = 4GB
328
339
 
329
340
  # - Genetic Query Optimizer -
330
341
 
@@ -391,6 +402,7 @@ log_rotation_size = 0 # Automatic rotation of logfiles will
391
402
  #syslog_split_messages = on # (9.6+)
392
403
 
393
404
  # This is only relevant when logging to eventlog (win32):
405
+ # (change requires restart)
394
406
  #event_source = 'PostgreSQL'
395
407
 
396
408
  # - When to Log -
@@ -582,11 +594,11 @@ timezone = 'UTC'
582
594
  # encoding
583
595
 
584
596
  # These settings are initialized by initdb, but they can be changed.
585
- lc_messages = 'en_US.UTF-8' # locale for system error message
597
+ lc_messages = 'en_US.UTF-8' # locale for system error message
586
598
  # strings
587
- lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
588
- lc_numeric = 'en_US.UTF-8' # locale for number formatting
589
- lc_time = 'en_US.UTF-8' # locale for time formatting
599
+ lc_monetary = 'en_US.UTF-8' # locale for monetary formatting
600
+ lc_numeric = 'en_US.UTF-8' # locale for number formatting
601
+ lc_time = 'en_US.UTF-8' # locale for time formatting
590
602
 
591
603
  # default configuration for text search
592
604
  default_text_search_config = 'pg_catalog.english'
@@ -606,6 +618,10 @@ default_text_search_config = 'pg_catalog.english'
606
618
  # (change requires restart)
607
619
  #max_pred_locks_per_transaction = 64 # min 10
608
620
  # (change requires restart)
621
+ #max_pred_locks_per_relation = -2 # negative values mean
622
+ # (max_pred_locks_per_transaction
623
+ # / -max_pred_locks_per_relation) - 1
624
+ #max_pred_locks_per_page = 2 # min 0
609
625
 
610
626
  #------------------------------------------------------------------------------
611
627
  # VERSION/PLATFORM COMPATIBILITY
@@ -620,7 +636,6 @@ default_text_search_config = 'pg_catalog.english'
620
636
  #lo_compat_privileges = off
621
637
  #operator_precedence_warning = off # (9.5+)
622
638
  #quote_all_identifiers = off
623
- #sql_inheritance = on
624
639
  #standard_conforming_strings = on
625
640
  #synchronize_seqscans = on
626
641