From 8d355b9517a0dedd74759e779a9ded6ec8bbb826 Mon Sep 17 00:00:00 2001 From: Mike Chittenden Date: Mon, 21 May 2018 17:26:59 -0400 Subject: [PATCH 01/19] allow setting state for postgresql_databases and postgresql_users --- README.md | 2 ++ tasks/databases.yml | 2 +- tasks/users.yml | 2 +- tests/docker/group_vars/postgresql.yml | 7 +++++++ tests/vars.yml | 11 +++++++++-- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a19a3d1c0..87eabdd83 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ postgresql_databases: uuid_ossp: yes # flag to install the uuid-ossp extension on this database (yes/no) citext: yes # flag to install the citext extension on this database (yes/no) encoding: "UTF-8" # override global {{ postgresql_encoding }} variable per database + state: "present" # optional; one of 'present', 'absent', 'dump', 'restore' lc_collate: "en_GB.UTF-8" # override global {{ postgresql_locale }} variable per database lc_ctype: "en_GB.UTF-8" # override global {{ postgresql_ctype }} variable per database @@ -83,6 +84,7 @@ postgresql_users: - name: baz pass: pass encrypted: no # denotes if the password is already encrypted. + state: "present" # optional; one of 'present', 'absent' # List of schemas to be created (optional) postgresql_schemas: diff --git a/tasks/databases.yml b/tasks/databases.yml index 8e412236e..f1459b8f0 100644 --- a/tasks/databases.yml +++ b/tasks/databases.yml @@ -14,7 +14,7 @@ lc_ctype: "{{ item.lc_ctype | default(postgresql_ctype) }}" port: "{{postgresql_port}}" template: "template0" - state: present + state: "{{ item.state | default('present') }}" login_user: "{{postgresql_admin_user}}" become: yes become_user: "{{postgresql_admin_user}}" diff --git a/tasks/users.yml b/tasks/users.yml index 12e2c9f2a..dafe16cb6 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -11,7 +11,7 @@ password: "{{ item.pass | default(omit) }}" encrypted: "{{ item.encrypted | default(omit) }}" port: "{{postgresql_port}}" - state: present + state: "{{ item.state | default('present') }}" login_user: "{{postgresql_admin_user}}" no_log: true become: yes diff --git a/tests/docker/group_vars/postgresql.yml b/tests/docker/group_vars/postgresql.yml index 2949e5cb2..d623c72c2 100644 --- a/tests/docker/group_vars/postgresql.yml +++ b/tests/docker/group_vars/postgresql.yml @@ -7,6 +7,10 @@ postgresql_databases: - name: foobar owner: baz + - name: qux + owner: baz + state: absent + # NOTE: postgresql >= 10 does not accept unencrypted passwords postgresql_users: - name: baz @@ -17,6 +21,9 @@ postgresql_users: pass: md51a1dc91c907325c69271ddf0c944bc72 encrypted: yes + - name: foo + state: absent + - name: zabaz postgresql_database_schemas: diff --git a/tests/vars.yml b/tests/vars.yml index c31639640..171b58d81 100644 --- a/tests/vars.yml +++ b/tests/vars.yml @@ -1,14 +1,18 @@ --- -postgresql_version: 10 +postgresql_version: 10 postgresql_databases: - name: foobar owner: baz + - name: qux + owner: baz + state: absent + postgresql_users: - # postgresql >=10 does not accept unencrypted passwords + # postgresql >=10 does not accept unencrypted passwords - name: baz pass: md51a1dc91c907325c69271ddf0c944bc72 encrypted: yes @@ -18,6 +22,9 @@ postgresql_users: pass: md51a1dc91c907325c69271ddf0c944bc72 encrypted: yes + - name: foo + state: absent + - name: zabaz postgresql_user_privileges: From c52d15e5c7e57ca8d2b78c8b5999bc3b86002ab8 Mon Sep 17 00:00:00 2001 From: MiLk Date: Sun, 15 Jul 2018 12:19:23 +0900 Subject: [PATCH 02/19] Update password_encryption for PostgreSQL 10 With PostgreSQL 10, `password_encryption` is no longer a boolean. It expects either `md5` or `scram-sha-256`. The value `on` is kept as an alias of `md5` for backward compatibility. --- templates/postgresql.conf-10.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index bf8e03cf2..d92a83a9d 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} # md5 or scram-sha-256 +password_encryption = '{{postgresql_password_encryption}}' # md5 or scram-sha-256 db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} From 2021b9f76f5518e8c2a1591edcb56baf0d19cbc1 Mon Sep 17 00:00:00 2001 From: Mikhail Konyakhin Date: Wed, 18 Dec 2019 13:24:43 +0300 Subject: [PATCH 03/19] Correct manage setting 'password_encryption' for PostgreSQL 10 and above. --- defaults/main.yml | 2 +- templates/postgresql.conf-10.j2 | 2 +- templates/postgresql.conf-11.j2 | 2 +- templates/postgresql.conf-12.j2 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8b1057622..aea2237e1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -148,7 +148,7 @@ postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" # (>= 9.2) postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" # (>= 9.2) postgresql_ssl_ca_file: "" # (>= 9.2) postgresql_ssl_crl_file: "" # (>= 9.2) -postgresql_password_encryption: on +postgresql_password_encryption: "{{ 'md5' if postgresql_version is version_compare('10', '>=') else 'on' }}" postgresql_db_user_namespace: off postgresql_row_security: off # (>= 9.5) diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index 53636991d..cf00d9dda 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} # md5 or scram-sha-256 +password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} diff --git a/templates/postgresql.conf-11.j2 b/templates/postgresql.conf-11.j2 index dd989eea2..2f0e58e5e 100644 --- a/templates/postgresql.conf-11.j2 +++ b/templates/postgresql.conf-11.j2 @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT; # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ 'on' if postgresql_password_encryption else 'off' }} # md5 or scram-sha-256 +password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos diff --git a/templates/postgresql.conf-12.j2 b/templates/postgresql.conf-12.j2 index 9aee094f7..9632b7595 100644 --- a/templates/postgresql.conf-12.j2 +++ b/templates/postgresql.conf-12.j2 @@ -89,7 +89,7 @@ tcp_user_timeout = {{ postgresql_tcp_user_timeout }} # TCP_USE # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ 'on' if postgresql_password_encryption else 'off' }} # md5 or scram-sha-256 +password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos From 5ad154b91e7ec180611bfbe0a4b499a614a19882 Mon Sep 17 00:00:00 2001 From: Uman Shahzad Date: Fri, 10 Jan 2020 17:14:27 +0500 Subject: [PATCH 04/19] Update sync standby names to include choose keyword. This copies the logic to render the string from the pg-10 template. --- templates/postgresql.conf-11.j2 | 2 +- templates/postgresql.conf-12.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/postgresql.conf-11.j2 b/templates/postgresql.conf-11.j2 index dd989eea2..bdda5e32b 100644 --- a/templates/postgresql.conf-11.j2 +++ b/templates/postgresql.conf-11.j2 @@ -252,7 +252,7 @@ track_commit_timestamp = {{ 'on' if postgresql_track_commit_timestamp else 'off' # These settings are ignored on a standby server. -synchronous_standby_names = '{{ postgresql_synchronous_standby_num_sync }}{% if postgresql_synchronous_standby_names != [] %} ({{ postgresql_synchronous_standby_names | join(',') }}){% endif %}' # standby servers that provide sync rep +synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}{% if postgresql_synchronous_standby_choose_sync != "" and postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_choose_sync }} {% endif %}{% if postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_num_sync }} ({% endif %}"{{ postgresql_synchronous_standby_names | join('\",\"') }}"{% if postgresql_synchronous_standby_num_sync != "" %}){% endif %}{% endif %}' # standby servers that provide sync rep # method to choose sync standbys, number of sync standbys, # and comma-separated list of application_name # from standby(s); '*' = all diff --git a/templates/postgresql.conf-12.j2 b/templates/postgresql.conf-12.j2 index 9aee094f7..28645361c 100644 --- a/templates/postgresql.conf-12.j2 +++ b/templates/postgresql.conf-12.j2 @@ -299,7 +299,7 @@ track_commit_timestamp = {{ 'on' if postgresql_track_commit_timestamp else 'off' # These settings are ignored on a standby server. -synchronous_standby_names = '{{ postgresql_synchronous_standby_num_sync }}{% if postgresql_synchronous_standby_names != [] %} ({{ postgresql_synchronous_standby_names | join(',') }}){% endif %}' # standby servers that provide sync rep +synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}{% if postgresql_synchronous_standby_choose_sync != "" and postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_choose_sync }} {% endif %}{% if postgresql_synchronous_standby_num_sync != "" %}{{ postgresql_synchronous_standby_num_sync }} ({% endif %}"{{ postgresql_synchronous_standby_names | join('\",\"') }}"{% if postgresql_synchronous_standby_num_sync != "" %}){% endif %}{% endif %}' # standby servers that provide sync rep # method to choose sync standbys, number of sync standbys, # and comma-separated list of application_name # from standby(s); '*' = all From 90a298c98687e85777f1569049b800efd01b9e03 Mon Sep 17 00:00:00 2001 From: Daniel Paufler Date: Mon, 25 May 2020 17:30:41 +0200 Subject: [PATCH 05/19] local become not necessary --- tasks/extensions/configure_repmgr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/extensions/configure_repmgr.yml b/tasks/extensions/configure_repmgr.yml index 51a19a619..e64e303fa 100644 --- a/tasks/extensions/configure_repmgr.yml +++ b/tasks/extensions/configure_repmgr.yml @@ -111,6 +111,7 @@ wait_for: timeout: 2 delegate_to: localhost + become: false - name: Repmgr | Register standby command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{postgresql_conf_directory}}/repmgr.conf standby register" From b4f7c06cb4666b8e6775da4668c459496a842883 Mon Sep 17 00:00:00 2001 From: Anthony Caetano Date: Wed, 22 Jan 2020 09:08:46 +0200 Subject: [PATCH 06/19] Use the repmgr_config_directory for the location of the repmgr.conf not the postgresql_conf_directory --- tasks/extensions/configure_repmgr.yml | 14 +++++++------- tasks/extensions/detect_repmgr_primary.yml | 2 +- templates/repmgr.custom.conf.j2 | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tasks/extensions/configure_repmgr.yml b/tasks/extensions/configure_repmgr.yml index e64e303fa..208229f58 100644 --- a/tasks/extensions/configure_repmgr.yml +++ b/tasks/extensions/configure_repmgr.yml @@ -1,7 +1,7 @@ - name: Repmgr | Update configuration (repmgr.conf) template: src: "repmgr.conf-{{ repmgr_version[:3] }}.j2" - dest: "{{postgresql_conf_directory}}/repmgr.conf" + dest: "{{repmgr_config_directory}}/repmgr.conf" owner: "{{ postgresql_service_user }}" group: "{{ postgresql_service_group }}" mode: 0640 @@ -76,7 +76,7 @@ mode: 0600 - name: Repmgr | Check cluster status - command: "{{postgresql_bin_directory}}/repmgr -f {{postgresql_conf_directory}}/repmgr.conf cluster show" + command: "{{postgresql_bin_directory}}/repmgr -f {{repmgr_config_directory}}/repmgr.conf cluster show" become: yes become_user: "{{ postgresql_service_user }}" changed_when: repmgr_cluster_show.rc != 0 @@ -84,7 +84,7 @@ ignore_errors: True - name: Repmgr | Register as primary - command: "{{postgresql_bin_directory}}/repmgr -f {{postgresql_conf_directory}}/repmgr.conf primary register" + command: "{{postgresql_bin_directory}}/repmgr -f {{repmgr_config_directory}}/repmgr.conf primary register" become: yes become_user: "{{ postgresql_service_user }}" when: repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "primary" in repmgr_cluster_show.stdout @@ -96,7 +96,7 @@ when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout - name: Repmgr | Clone standby - command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{postgresql_conf_directory}}/repmgr.conf standby clone" + command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf standby clone" become: yes become_user: "{{ postgresql_service_user }}" when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout @@ -114,13 +114,13 @@ become: false - name: Repmgr | Register standby - command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{postgresql_conf_directory}}/repmgr.conf standby register" + command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf standby register" become: yes become_user: "{{ postgresql_service_user }}" when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout - name: Repmgr | Verify cluster functionality - command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{postgresql_conf_directory}}/repmgr.conf cluster crosscheck" + command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf cluster crosscheck" become: yes become_user: "{{ postgresql_service_user }}" @@ -144,7 +144,7 @@ - name: Repmgr | Setup cluster monitoring history cleanup copy: - content: "{{postgresql_bin_directory}}/repmgr -f {{postgresql_conf_directory}}/repmgr.conf cluster cleanup --keep-history={{repmgr_keep_history_days}}" + content: "{{postgresql_bin_directory}}/repmgr -f {{repmgr_config_directory}}/repmgr.conf cluster cleanup --keep-history={{repmgr_keep_history_days}}" dest: "/etc/cron.daily/repmgr_cleanup" mode: 0755 when: repmgr_monitoring_history == "true" or repmgr_failover == "automatic" diff --git a/tasks/extensions/detect_repmgr_primary.yml b/tasks/extensions/detect_repmgr_primary.yml index a19fc030c..cc0b66ea5 100644 --- a/tasks/extensions/detect_repmgr_primary.yml +++ b/tasks/extensions/detect_repmgr_primary.yml @@ -1,5 +1,5 @@ - name: Repmgr | Detect primary - shell: "set -o pipefail ; {{ postgresql_bin_directory }}/repmgr -f {{ postgresql_conf_directory }}/repmgr.conf cluster show | grep primary | cut -d '|' -f 2 | sed 's/\ //g'" + shell: "set -o pipefail ; {{ postgresql_bin_directory }}/repmgr -f {{ repmgr_config_directory }}/repmgr.conf cluster show | grep primary | cut -d '|' -f 2 | sed 's/\ //g'" register: repmgr_primary_check become: yes become_user: postgres diff --git a/templates/repmgr.custom.conf.j2 b/templates/repmgr.custom.conf.j2 index 6671cd012..2a0bec287 100644 --- a/templates/repmgr.custom.conf.j2 +++ b/templates/repmgr.custom.conf.j2 @@ -1,3 +1,3 @@ [Service] # Location of repmgr conf file: -Environment=REPMGRDCONF={{postgresql_conf_directory}}/repmgr.conf +Environment=REPMGRDCONF={{repmgr_config_directory}}/repmgr.conf From ce7a384d054cddfd4b425b0de8e05ff5271d4751 Mon Sep 17 00:00:00 2001 From: Anthony Caetano Date: Wed, 22 Jan 2020 09:14:30 +0200 Subject: [PATCH 07/19] Use postgresql_port in the 'repmgr standby clone' for postgres instances running on non-default ports --- tasks/extensions/configure_repmgr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/extensions/configure_repmgr.yml b/tasks/extensions/configure_repmgr.yml index 208229f58..03fbc63e6 100644 --- a/tasks/extensions/configure_repmgr.yml +++ b/tasks/extensions/configure_repmgr.yml @@ -96,7 +96,7 @@ when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout - name: Repmgr | Clone standby - command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf standby clone" + command: "{{postgresql_bin_directory}}/repmgr -F -h {% for host, vars in hostvars.items() if 'repmgr_primary' in vars and vars['repmgr_primary'] == True %}{{ host }}{% endfor %} -p {{ postgresql_port }} -U repmgr -d repmgr -f {{repmgr_config_directory}}/repmgr.conf standby clone" become: yes become_user: "{{ postgresql_service_user }}" when: not repmgr_primary and not ansible_hostname in repmgr_cluster_show.stdout and not "standby" in repmgr_cluster_show.stdout From 1c4ea0cdcf26b3fe13d89fb408db88094bb31255 Mon Sep 17 00:00:00 2001 From: Anthony Caetano Date: Wed, 22 Jan 2020 09:18:37 +0200 Subject: [PATCH 08/19] Don't assume the first host in the play is the master, use the configured repmgr_master as the master --- tasks/extensions/detect_repmgr_primary.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/extensions/detect_repmgr_primary.yml b/tasks/extensions/detect_repmgr_primary.yml index cc0b66ea5..763f2f05b 100644 --- a/tasks/extensions/detect_repmgr_primary.yml +++ b/tasks/extensions/detect_repmgr_primary.yml @@ -20,7 +20,7 @@ - name: Repmgr | Declare as primary for new installation set_fact: - repmgr_primary: "{{ True if ansible_hostname == ansible_play_hosts[0] or inventory_hostname == ansible_play_hosts[0] else False }}" + repmgr_primary: "{{ True if ansible_hostname == repmgr_master or inventory_hostname == repmgr_master else False }}" when: "hostvars['localhost'].get('repmgr_primary_declared', false) != true" - debug: From 72458802f374b736d0cdecaedf61cdf769abd8b1 Mon Sep 17 00:00:00 2001 From: Anthony Caetano Date: Wed, 22 Jan 2020 09:28:34 +0200 Subject: [PATCH 09/19] Don't log .pgpass updates as they contain passwords --- tasks/extensions/configure_repmgr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/extensions/configure_repmgr.yml b/tasks/extensions/configure_repmgr.yml index 03fbc63e6..4539bee5c 100644 --- a/tasks/extensions/configure_repmgr.yml +++ b/tasks/extensions/configure_repmgr.yml @@ -32,6 +32,7 @@ group: "{{ postgresql_service_group }}" mode: 0400 trim_blocks: no + no_log: true - name: Repmgr | Generate ssh keypair for postgres user command: "ssh-keygen -b {{repmgr_ssh_key_bits}} -t {{repmgr_ssh_key_type}} -f {{repmgr_private_key_path}} -N ''" From eef74a2d4222f5acc20953c2ba0663a2b2b78c8d Mon Sep 17 00:00:00 2001 From: Anthony Caetano Date: Wed, 29 Jan 2020 16:51:41 +0200 Subject: [PATCH 10/19] add debug print of repmgr_master --- tasks/extensions/detect_repmgr_primary.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/extensions/detect_repmgr_primary.yml b/tasks/extensions/detect_repmgr_primary.yml index 763f2f05b..157ecc3d8 100644 --- a/tasks/extensions/detect_repmgr_primary.yml +++ b/tasks/extensions/detect_repmgr_primary.yml @@ -29,3 +29,9 @@ - debug: var: repmgr_primary_check verbosity: 1 + +- debug: + var: repmgr_master + +- debug: + var: ansible_hostname From 4a62dc2991ee0f8eec41d062fe54efef13a79e5b Mon Sep 17 00:00:00 2001 From: Mikhail Konyakhin Date: Wed, 10 Jun 2020 11:39:41 +0300 Subject: [PATCH 11/19] Disable check correct values of postgresql_password_encryption. --- defaults/main.yml | 2 +- templates/postgresql.conf-10.j2 | 2 +- templates/postgresql.conf-11.j2 | 2 +- templates/postgresql.conf-12.j2 | 2 +- templates/postgresql.conf-9.1.j2 | 2 +- templates/postgresql.conf-9.2.j2 | 2 +- templates/postgresql.conf-9.3.j2 | 2 +- templates/postgresql.conf-9.4.j2 | 2 +- templates/postgresql.conf-9.5.j2 | 2 +- templates/postgresql.conf-9.6.j2 | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index aea2237e1..8b1057622 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -148,7 +148,7 @@ postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" # (>= 9.2) postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" # (>= 9.2) postgresql_ssl_ca_file: "" # (>= 9.2) postgresql_ssl_crl_file: "" # (>= 9.2) -postgresql_password_encryption: "{{ 'md5' if postgresql_version is version_compare('10', '>=') else 'on' }}" +postgresql_password_encryption: on postgresql_db_user_namespace: off postgresql_row_security: off # (>= 9.5) diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index cf00d9dda..c2fb2cf21 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} diff --git a/templates/postgresql.conf-11.j2 b/templates/postgresql.conf-11.j2 index 1898c8cc8..a194d8c46 100644 --- a/templates/postgresql.conf-11.j2 +++ b/templates/postgresql.conf-11.j2 @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT; # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 +password_encryption = {{ postgresql_password_encryption }} db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos diff --git a/templates/postgresql.conf-12.j2 b/templates/postgresql.conf-12.j2 index 8e94c9189..c64bdfaf1 100644 --- a/templates/postgresql.conf-12.j2 +++ b/templates/postgresql.conf-12.j2 @@ -89,7 +89,7 @@ tcp_user_timeout = {{ postgresql_tcp_user_timeout }} # TCP_USE # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ 'md5' if postgresql_password_encryption != 'scram-sha-256' else 'scram-sha-256' }} # md5 or scram-sha-256 +password_encryption = {{ postgresql_password_encryption }} db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos diff --git a/templates/postgresql.conf-9.1.j2 b/templates/postgresql.conf-9.1.j2 index d5a67086a..6b926e945 100644 --- a/templates/postgresql.conf-9.1.j2 +++ b/templates/postgresql.conf-9.1.j2 @@ -82,7 +82,7 @@ ssl = {{'on' if postgresql_ssl else 'off'}} # (change requires restart) ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}' # allowed SSL ciphers # (change requires restart) ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}} # amount of data between renegotiations -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} # Kerberos and GSSAPI diff --git a/templates/postgresql.conf-9.2.j2 b/templates/postgresql.conf-9.2.j2 index 53ff3a429..c05880de4 100644 --- a/templates/postgresql.conf-9.2.j2 +++ b/templates/postgresql.conf-9.2.j2 @@ -86,7 +86,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} # Kerberos and GSSAPI diff --git a/templates/postgresql.conf-9.3.j2 b/templates/postgresql.conf-9.3.j2 index cce063794..071875641 100644 --- a/templates/postgresql.conf-9.3.j2 +++ b/templates/postgresql.conf-9.3.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} # Kerberos and GSSAPI diff --git a/templates/postgresql.conf-9.4.j2 b/templates/postgresql.conf-9.4.j2 index 1ff5bb0fd..0049c8a47 100644 --- a/templates/postgresql.conf-9.4.j2 +++ b/templates/postgresql.conf-9.4.j2 @@ -89,7 +89,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} # GSSAPI using Kerberos diff --git a/templates/postgresql.conf-9.5.j2 b/templates/postgresql.conf-9.5.j2 index 5152f5174..49763b3e3 100644 --- a/templates/postgresql.conf-9.5.j2 +++ b/templates/postgresql.conf-9.5.j2 @@ -88,7 +88,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} diff --git a/templates/postgresql.conf-9.6.j2 b/templates/postgresql.conf-9.6.j2 index 2efdb1f1f..c06a87d8f 100644 --- a/templates/postgresql.conf-9.6.j2 +++ b/templates/postgresql.conf-9.6.j2 @@ -86,7 +86,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{'on' if postgresql_password_encryption else 'off'}} +password_encryption = {{postgresql_password_encryption}} db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} From bae39d73a5ec5df793a4deaeb27b01b16b6fab6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20T=C3=B3th?= Date: Wed, 30 Sep 2020 10:37:45 +0200 Subject: [PATCH 12/19] README.md example fixed and added include-as-task example * fixed existing example how to include this role (fixed case) * added new example how to include this role as task --- README.md | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d2f7f6e3a..6c8822fcd 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,32 @@ ansible-galaxy install ANXS.postgresql #### Example Playbook -Including an example of how to use your role: +An example how to include this role: - - hosts: postgresql-server +```yml +--- +- hosts: postgresql-server + roles: + - role: ANXS.postgresql become: yes - roles: - - { role: anxs.postgresql } +``` + +An example how to include this role as a task: + +```yml +--- +- hosts: postgresql-server + tasks: + - block: # workaround, see https://stackoverflow.com/a/56558842 + - name: PSQL installation and configuration + include_role: + name: ANXS.postgresql + vars: + postgresql_users: + - name: abc + password: abc + become: true +``` #### Dependencies From 0c15305a9e67529b992c0ec9df57fdda424fff9b Mon Sep 17 00:00:00 2001 From: Markus Gsottberger Date: Wed, 18 Nov 2020 14:52:28 +0100 Subject: [PATCH 13/19] quoting --- templates/repmgr.conf-4.2.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/repmgr.conf-4.2.j2 b/templates/repmgr.conf-4.2.j2 index 55fe99fd3..70c3e1b58 100644 --- a/templates/repmgr.conf-4.2.j2 +++ b/templates/repmgr.conf-4.2.j2 @@ -292,11 +292,11 @@ reconnect_attempts={{repmgr_reconnect_attempts}} # Number of attempts which wil # primary (or other upstream node) reconnect_interval={{repmgr_reconnect_interval}} # Interval between attempts to reconnect to an unreachable # primary (or other upstream node) -{{ '' if repmgr_promote_command else '#' }}promote_command={{repmgr_promote_command}} # command repmgrd executes when promoting a new primary; use something like: +{{ '' if repmgr_promote_command else '#' }}promote_command='{{repmgr_promote_command}}' # command repmgrd executes when promoting a new primary; use something like: # # repmgr standby promote -f /etc/repmgr.conf # -{{ '' if repmgr_follow_command else '#' }}follow_command={{repmgr_follow_command}} # command repmgrd executes when instructing a standby to follow a new primary; +{{ '' if repmgr_follow_command else '#' }}follow_command='{{repmgr_follow_command}}' # command repmgrd executes when instructing a standby to follow a new primary; # use something like: # # repmgr standby follow -f /etc/repmgr.conf -W --upstream-node-id=%n From c1d57d0c521f659f3f7f54fdf43b750e5ebb3de3 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 10 Feb 2021 10:57:56 +0000 Subject: [PATCH 14/19] style: Standardising postgresql.conf style for passsword_encryption --- templates/postgresql.conf-10.j2 | 2 +- templates/postgresql.conf-11.j2 | 6 +++--- templates/postgresql.conf-12.j2 | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index 04e72df7a..2016bbe81 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = '{{postgresql_password_encryption}}' # md5 or scram-sha-256 +password_encryption = {{postgresql_password_encryption}} # md5 or scram-sha-256 db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} diff --git a/templates/postgresql.conf-11.j2 b/templates/postgresql.conf-11.j2 index a194d8c46..56dac581a 100644 --- a/templates/postgresql.conf-11.j2 +++ b/templates/postgresql.conf-11.j2 @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT; # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ postgresql_password_encryption }} +password_encryption = {{ postgresql_password_encryption }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos @@ -169,7 +169,7 @@ effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000; max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart) max_parallel_maintenance_workers = {{ postgresql_max_parallel_maintenance_workers }} # taken from max_parallel_workers max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers -parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} +parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that # can be used in parallel operations old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate @@ -350,7 +350,7 @@ geqo_seed = {{ postgresql_geqo_seed }} # range 0.0-1.0 default_statistics_target = {{ postgresql_default_statistics_target }} # range 1-10000 constraint_exclusion = {{ postgresql_constraint_exclusion }} # on, off, or partition cursor_tuple_fraction = {{ postgresql_cursor_tuple_fraction }} # range 0.0-1.0 -from_collapse_limit = {{ postgresql_from_collapse_limit }} +from_collapse_limit = {{ postgresql_from_collapse_limit }} join_collapse_limit = {{ postgresql_join_collapse_limit }} # 1 disables collapsing of explicit # JOIN clauses force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode | bool == true or postgresql_force_parallel_mode == 'on' ) else ( 'regress' if postgresql_force_parallel_mode == 'regress' else 'off' ) }} diff --git a/templates/postgresql.conf-12.j2 b/templates/postgresql.conf-12.j2 index c64bdfaf1..b69622ffe 100644 --- a/templates/postgresql.conf-12.j2 +++ b/templates/postgresql.conf-12.j2 @@ -89,7 +89,7 @@ tcp_user_timeout = {{ postgresql_tcp_user_timeout }} # TCP_USE # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ postgresql_password_encryption }} +password_encryption = {{ postgresql_password_encryption }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos @@ -178,7 +178,7 @@ effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000; max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart) max_parallel_maintenance_workers = {{ postgresql_max_parallel_maintenance_workers }} # taken from max_parallel_workers max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers -parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} +parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that # can be used in parallel operations old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate @@ -403,7 +403,7 @@ geqo_seed = {{ postgresql_geqo_seed }} # range 0.0-1.0 default_statistics_target = {{ postgresql_default_statistics_target }} # range 1-10000 constraint_exclusion = {{ postgresql_constraint_exclusion }} # on, off, or partition cursor_tuple_fraction = {{ postgresql_cursor_tuple_fraction }} # range 0.0-1.0 -from_collapse_limit = {{ postgresql_from_collapse_limit }} +from_collapse_limit = {{ postgresql_from_collapse_limit }} join_collapse_limit = {{ postgresql_join_collapse_limit }} # 1 disables collapsing of explicit # JOIN clauses force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode | bool == true or postgresql_force_parallel_mode == 'on' ) else ( 'regress' if postgresql_force_parallel_mode == 'regress' else 'off' ) }} From 48fbb696381e7c9fdecbae0a64b2381389abecc2 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 10 Feb 2021 12:34:03 +0000 Subject: [PATCH 15/19] feat: Remove deprecated PostgreSQL versions < 9.5 --- README.md | 20 +- defaults/main.yml | 5 +- templates/postgresql.conf-9.1.j2 | 562 -------------------------- templates/postgresql.conf-9.1.orig | 557 -------------------------- templates/postgresql.conf-9.2.j2 | 579 --------------------------- templates/postgresql.conf-9.2.orig | 574 -------------------------- templates/postgresql.conf-9.3.j2 | 601 ---------------------------- templates/postgresql.conf-9.3.orig | 596 --------------------------- templates/postgresql.conf-9.4.j2 | 619 ----------------------------- templates/postgresql.conf-9.4.orig | 614 ---------------------------- tests/docker/group_vars/all.yml | 1 - vars/postgresql_9.3.yml | 4 - vars/postgresql_9.4.yml | 4 - 13 files changed, 12 insertions(+), 4724 deletions(-) delete mode 100644 templates/postgresql.conf-9.1.j2 delete mode 100644 templates/postgresql.conf-9.1.orig delete mode 100644 templates/postgresql.conf-9.2.j2 delete mode 100644 templates/postgresql.conf-9.2.orig delete mode 100644 templates/postgresql.conf-9.3.j2 delete mode 100644 templates/postgresql.conf-9.3.orig delete mode 100644 templates/postgresql.conf-9.4.j2 delete mode 100644 templates/postgresql.conf-9.4.orig delete mode 100644 vars/postgresql_9.3.yml delete mode 100644 vars/postgresql_9.4.yml diff --git a/README.md b/README.md index 310b1dccf..96ac29989 100644 --- a/README.md +++ b/README.md @@ -34,16 +34,16 @@ Including an example of how to use your role: #### Compatibility matrix -| Distribution / PostgreSQL | <= 9.3 | 9.4 | 9.5 | 9.6 | 10 | 11 | 12 | -| ------------------------- |:---:|:---:|:---:|:---:|:--:|:--:|:--:| -| Ubuntu 14.04 | :no_entry: | :no_entry:| :no_entry:| :no_entry:| :no_entry:| :no_entry:| :no_entry:| -| Ubuntu 16.04 | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| -| Debian 8.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| -| Debian 9.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| -| CentOS 6.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| -| CentOS 7.x | :no_entry: | :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| :white_check_mark:| -| CentOS 8.x | :no_entry: | :grey_question:| :grey_question:| :grey_question:| :grey_question:| :grey_question:| :grey_question:| -| Fedora latest | :no_entry: | :x:| :x:| :x:| :x:| :x:| :x:| +| Distribution / PostgreSQL | 9.5 | 9.6 | 10 | 11 | 12 | 13 | +| ------------------------- |:---:|:---:|:--:|:--:|:--:|:--:| +| Ubuntu 14.04 | :no_entry: | :no_entry: | :no_entry: | :no_entry: | :no_entry: |:no_entry: | +| Ubuntu 16.04 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | +| Debian 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | +| Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | +| CentOS 6.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | +| CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | +| CentOS 8.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :no_entry: | +| Fedora latest | :x: | :x: | :x: | :x: | :x: | :x: | - :white_check_mark: - tested, works fine - :warning: - Not for production use diff --git a/defaults/main.yml b/defaults/main.yml index 8b1057622..2b55d9ee0 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -140,7 +140,7 @@ postgresql_ssl_prefer_server_ciphers: on postgresql_ssl_ecdh_curve: "prime256v1" postgresql_ssl_min_protocol_version: "TLSv1" # (>= 12) postgresql_ssl_max_protocol_version: "" # (>= 12) -postgresql_ssl_dh_params_file: "" # (>= 10) +postgresql_ssl_dh_params_file: "" # (>= 10) postgresql_ssl_passphrase_command: "" # (>= 11) postgresql_ssl_passphrase_command_supports_reload: off # (>= 11) postgresql_ssl_renegotiation_limit: 512MB # amount of data between renegotiations @@ -280,7 +280,6 @@ postgresql_commit_siblings: 5 # range 1-1000 # - Checkpoints - -postgresql_checkpoint_segments: 3 # (<= 9.4) in logfile segments, min 1, 16MB each postgresql_max_wal_size: 1GB # (>= 9.5) postgresql_min_wal_size: 80MB # (>= 9.5) postgresql_checkpoint_flush_after: 0 # (>= 9.6) 0 disables, @@ -372,7 +371,7 @@ postgresql_wal_receiver_timeout: 60s # time to wait before retrying to retrieve WAL after a failed attempt postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5) -# - Subscribers - (>= 10) +# - Subscribers - (>= 10) # These settings are ignored on a publisher. diff --git a/templates/postgresql.conf-9.1.j2 b/templates/postgresql.conf-9.1.j2 deleted file mode 100644 index 6b926e945..000000000 --- a/templates/postgresql.conf-9.1.j2 +++ /dev/null @@ -1,562 +0,0 @@ -# {{ ansible_managed }} -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '{{postgresql_data_directory}}' # use data in another directory - # (change requires restart) -hba_file = '{{postgresql_hba_file}}' # host-based authentication file - # (change requires restart) -ident_file = '{{postgresql_ident_file}}' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '{{postgresql_external_pid_file or "(none)"}}' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '{{postgresql_listen_addresses|join(',')}}' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; '*' for all - # (change requires restart) -port = {{postgresql_port}} # (change requires restart) -max_connections = {{postgresql_max_connections}} # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -superuser_reserved_connections = {{postgresql_superuser_reserved_connections}} # (change requires restart) -unix_socket_directory = '{{postgresql_unix_socket_directory or (postgresql_unix_socket_directories and postgresql_unix_socket_directories[0]) or ''}}' # (change requires restart) -unix_socket_group = '{{postgresql_unix_socket_group}}' # (change requires restart) -unix_socket_permissions = {{postgresql_unix_socket_permissions}} # begin with 0 to use octal notation - # (change requires restart) -bonjour = {{'on' if postgresql_bonjour else 'off'}} # advertise server via Bonjour - # (change requires restart) -bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -authentication_timeout = {{postgresql_authentication_timeout}} # 1s-600s -ssl = {{'on' if postgresql_ssl else 'off'}} # (change requires restart) -ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}' # allowed SSL ciphers - # (change requires restart) -ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}} # amount of data between renegotiations -password_encryption = {{postgresql_password_encryption}} -db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} - -# Kerberos and GSSAPI -krb_server_keyfile = '{{postgresql_krb_server_keyfile}}' -krb_srvname = '{{postgresql_krb_srvname}}' # (Kerberos only) -krb_caseins_users = {{'on' if postgresql_db_user_namespace else 'off'}} - -# - TCP Keepalives - -# see "man 7 tcp" for details - -tcp_keepalives_idle = {{postgresql_tcp_keepalives_idle}} # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -tcp_keepalives_interval = {{postgresql_tcp_keepalives_interval}} # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -tcp_keepalives_count = {{postgresql_tcp_keepalives_count}} # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = {{postgresql_shared_buffers}} # min 128kB - # (change requires restart) -temp_buffers = {{postgresql_temp_buffers}} # min 800kB -max_prepared_transactions = {{postgresql_max_prepared_transactions}} # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -work_mem = {{postgresql_work_mem}} # min 64kB -maintenance_work_mem = {{postgresql_maintenance_work_mem}} # min 1MB -max_stack_depth = {{postgresql_max_stack_depth}} # min 100kB - -# - Kernel Resource Usage - - -max_files_per_process = {{postgresql_max_files_per_process}} # min 25 - # (change requires restart) -shared_preload_libraries = '{{postgresql_shared_preload_libraries|join(',')}}' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -vacuum_cost_delay = {{postgresql_vacuum_cost_delay}} # 0-100 milliseconds -vacuum_cost_page_hit = {{postgresql_vacuum_cost_page_hit}} # 0-10000 credits -vacuum_cost_page_miss = {{postgresql_vacuum_cost_page_miss}} # 0-10000 credits -vacuum_cost_page_dirty = {{postgresql_vacuum_cost_page_dirty}} # 0-10000 credits -vacuum_cost_limit = {{postgresql_vacuum_cost_limit}} # 1-10000 credits - -# - Background Writer - - -bgwriter_delay = {{postgresql_bgwriter_delay}} # 10-10000ms between rounds -bgwriter_lru_maxpages = {{postgresql_bgwriter_lru_maxpages}} # 0-1000 max buffers written/round -bgwriter_lru_multiplier = {{postgresql_bgwriter_lru_multiplier}} # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -effective_io_concurrency = {{postgresql_effective_io_concurrency}} # 1-1000; 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -wal_level = {{postgresql_wal_level}} # minimal, archive, or hot_standby - # (change requires restart) -fsync = {{'on' if postgresql_fsync else 'off'}} # turns forced synchronization on or off -synchronous_commit = {{postgresql_synchronous_commit}} # synchronization level; on, off, or local -wal_sync_method = {{postgresql_wal_sync_method}} # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -full_page_writes = {{'on' if postgresql_full_page_writes else 'off'}} # recover from partial page writes -wal_buffers = {{postgresql_wal_buffers}} # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -wal_writer_delay = {{postgresql_wal_writer_delay}} # 1-10000 milliseconds - -commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds -commit_siblings = {{postgresql_commit_siblings}} # range 1-1000 - -# - Checkpoints - - -checkpoint_segments = {{postgresql_checkpoint_segments}} # in logfile segments, min 1, 16MB each -checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1h -checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0 -checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables - -# - Archiving - - -archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done - # (change requires restart) -archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment -archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Master Server - - -# These settings are ignored on a standby server - -max_wal_senders = {{postgresql_max_wal_senders}} # max number of walsender processes - # (change requires restart) -wal_sender_delay = {{postgresql_wal_sender_delay}} # walsender cycle time, 1-10000 milliseconds -wal_keep_segments = {{postgresql_wal_keep_segments}} # in logfile segments, 16MB each; 0 disables -vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed -replication_timeout = {{postgresql_replication_timeout or postgresql_wal_sender_timeout}} # in milliseconds; 0 disables -synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}"{{postgresql_synchronous_standby_names|join('\",\"')}}"{% endif %}' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all - -# - Standby Servers - - -# These settings are ignored on a master server - -hot_standby = {{'on' if postgresql_hot_standby else 'off'}} # "on" allows queries during recovery - # (change requires restart) -max_standby_archive_delay = {{postgresql_max_standby_archive_delay}} # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -max_standby_streaming_delay = {{postgresql_max_standby_streaming_delay}} # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -wal_receiver_status_interval = {{postgresql_wal_receiver_status_interval}} # send replies at least this often - # 0 disables -hot_standby_feedback = {{'on' if postgresql_hot_standby_feedback else 'off'}} # send info from standby to prevent - # query conflicts - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -enable_bitmapscan = {{'on' if postgresql_enable_bitmapscan else 'off'}} -enable_hashagg = {{'on' if postgresql_enable_hashagg else 'off'}} -enable_hashjoin = {{'on' if postgresql_enable_hashjoin else 'off'}} -enable_indexscan = {{'on' if postgresql_enable_indexscan else 'off'}} -enable_material = {{'on' if postgresql_enable_material else 'off'}} -enable_mergejoin = {{'on' if postgresql_enable_mergejoin else 'off'}} -enable_nestloop = {{'on' if postgresql_enable_nestloop else 'off'}} -enable_seqscan = {{'on' if postgresql_enable_seqscan else 'off'}} -enable_sort = {{'on' if postgresql_enable_sort else 'off'}} -enable_tidscan = {{'on' if postgresql_enable_tidscan else 'off'}} - -# - Planner Cost Constants - - -seq_page_cost = {{postgresql_seq_page_cost}} # measured on an arbitrary scale -random_page_cost = {{postgresql_random_page_cost}} # same scale as above -cpu_tuple_cost = {{postgresql_cpu_tuple_cost}} # same scale as above -cpu_index_tuple_cost = {{postgresql_cpu_index_tuple_cost}} # same scale as above -cpu_operator_cost = {{postgresql_cpu_operator_cost}} # same scale as above -effective_cache_size = {{postgresql_effective_cache_size}} - -# - Genetic Query Optimizer - - -geqo = {{'on' if postgresql_geqo else 'off'}} -geqo_threshold = {{postgresql_geqo_threshold}} -geqo_effort = {{postgresql_geqo_effort}} # range 1-10 -geqo_pool_size = {{postgresql_geqo_pool_size}} # selects default based on effort -geqo_generations = {{postgresql_geqo_generations}} # selects default based on effort -geqo_selection_bias = {{postgresql_geqo_selection_bias}} # range 1.5-2.0 -geqo_seed = {{postgresql_geqo_seed}} # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = {{postgresql_default_statistics_target}} # range 1-10000 -constraint_exclusion = {{postgresql_constraint_exclusion}} # on, off, or partition -cursor_tuple_fraction = {{postgresql_cursor_tuple_fraction}} # range 0.0-1.0 -from_collapse_limit = {{postgresql_from_collapse_limit}} -join_collapse_limit = {{postgresql_join_collapse_limit}} # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -log_destination = '{{postgresql_log_destination}}' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = {{'on' if postgresql_logging_collector else 'off'}} # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = '{{postgresql_log_directory}}' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = '{{postgresql_log_filename}}' # log file name pattern, - # can include strftime() escapes -log_file_mode = {{postgresql_log_file_mode}} # creation mode for log files, - # begin with 0 to use octal notation -log_truncate_on_rotation = {{'on' if postgresql_log_truncate_on_rotation else 'off'}} # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -log_rotation_age = {{postgresql_log_rotation_age}} # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = {{postgresql_log_rotation_size}} # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -syslog_facility = '{{postgresql_syslog_facility}}' -syslog_ident = '{{postgresql_syslog_ident}}' - -#silent_mode = off # Run server silently. - # DO NOT USE without syslog or - # logging_collector - # (change requires restart) - - -# - When to Log - - -client_min_messages = {{postgresql_client_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -log_min_messages = {{postgresql_log_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - # -log_min_error_statement = {{postgresql_log_min_error_statement}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -debug_print_parse = {{'on' if postgresql_debug_print_parse else 'off'}} -debug_print_rewritten = {{'on' if postgresql_debug_print_rewritten else 'off'}} -debug_print_plan = {{'on' if postgresql_debug_print_plan else 'off'}} -debug_pretty_print = {{'on' if postgresql_debug_pretty_print else 'off'}} -log_checkpoints = {{'on' if postgresql_log_checkpoints else 'off'}} -log_connections = {{'on' if postgresql_log_connections else 'off'}} -log_disconnections = {{'on' if postgresql_log_disconnections else 'off'}} -log_duration = {{'on' if postgresql_log_duration else 'off'}} -log_error_verbosity = {{postgresql_log_error_verbosity}} # terse, default, or verbose messages -log_hostname = {{'on' if postgresql_log_hostname else 'off'}} -log_line_prefix = '{{postgresql_log_line_prefix}}' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -log_lock_waits = {{'on' if postgresql_log_lock_waits else 'off'}} # log lock waits >= deadlock_timeout -log_statement = '{{postgresql_log_statement}}' # none, ddl, mod, all -log_temp_files = {{postgresql_log_temp_files}} # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = '{{postgresql_log_timezone}}' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -track_activities = {{'on' if postgresql_track_activities else 'off'}} -track_counts = {{'on' if postgresql_track_counts else 'off'}} -track_functions = {{postgresql_track_functions}} # none, pl, all -track_activity_query_size = {{postgresql_track_activity_query_size}} # (change requires restart) -update_process_title = {{'on' if postgresql_update_process_title else 'off'}} -stats_temp_directory = '{{postgresql_stats_temp_directory}}' - - -# - Statistics Monitoring - - -log_parser_stats = {{'on' if postgresql_log_parser_stats else 'off'}} -log_planner_stats = {{'on' if postgresql_log_planner_stats else 'off'}} -log_executor_stats = {{'on' if postgresql_log_executor_stats else 'off'}} -log_statement_stats = {{'on' if postgresql_log_statement_stats else 'off'}} - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -autovacuum = {{'on' if postgresql_autovacuum else 'off'}} # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -log_autovacuum_min_duration = {{postgresql_log_autovacuum_min_duration}} # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -autovacuum_max_workers = {{postgresql_autovacuum_max_workers}} # max number of autovacuum subprocesses - # (change requires restart) -autovacuum_naptime = {{postgresql_autovacuum_naptime}} # time between autovacuum runs -autovacuum_vacuum_threshold = {{postgresql_autovacuum_vacuum_threshold}} # min number of row updates before - # vacuum -autovacuum_analyze_threshold = {{postgresql_autovacuum_analyze_threshold}} # min number of row updates before - # analyze -autovacuum_vacuum_scale_factor = {{postgresql_autovacuum_vacuum_scale_factor}} # fraction of table size before vacuum -autovacuum_analyze_scale_factor = {{postgresql_autovacuum_analyze_scale_factor}} # fraction of table size before analyze -autovacuum_freeze_max_age = {{postgresql_autovacuum_freeze_max_age}} # maximum XID age before forced vacuum - # (change requires restart) -autovacuum_vacuum_cost_delay = {{postgresql_autovacuum_vacuum_cost_delay}} # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -autovacuum_vacuum_cost_limit = {{postgresql_autovacuum_vacuum_cost_limit}} # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -search_path = '{{postgresql_search_path|join(',')}}' # schema names -default_tablespace = '{{postgresql_default_tablespace}}' # a tablespace name, '' uses the default -temp_tablespaces = '{{postgresql_temp_tablespaces|join(',')}}' # a list of tablespace names, '' uses - # only default tablespace -check_function_bodies = {{'on' if postgresql_check_function_bodies else 'off'}} -default_transaction_isolation = '{{postgresql_default_transaction_isolation}}' -default_transaction_read_only = {{'on' if postgresql_default_transaction_read_only else 'off'}} -default_transaction_deferrable = {{'on' if postgresql_default_transaction_deferrable else 'off'}} -session_replication_role = '{{postgresql_session_replication_role}}' -statement_timeout = {{postgresql_statement_timeout}} # in milliseconds, 0 is disabled -vacuum_freeze_min_age = {{postgresql_vacuum_freeze_min_age}} -vacuum_freeze_table_age = {{postgresql_vacuum_freeze_table_age}} -bytea_output = '{{postgresql_bytea_output}}' # hex, escape -xmlbinary = '{{postgresql_xmlbinary}}' -xmloption = '{{postgresql_xmloption}}' -gin_fuzzy_search_limit = '{{postgresql_gin_fuzzy_search_limit}}' - -# - Locale and Formatting - - -datestyle = '{{postgresql_datestyle|join(',')}}' -intervalstyle = '{{postgresql_intervalstyle}}' -timezone = '{{postgresql_timezone}}' -timezone_abbreviations = '{{postgresql_timezone_abbreviations}}' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -extra_float_digits = {{postgresql_extra_float_digits}} # min -15, max 3 -{% if not postgresql_client_encoding %} -#client_encoding = sql_ascii # actually, defaults to database -{% else %} -client_encoding = {{postgresql_client_encoding}} # actually, defaults to database -{% endif %} - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = '{{postgresql_lc_messages}}' # locale for system error message - # strings -lc_monetary = '{{postgresql_lc_monetary}}' # locale for monetary formatting -lc_numeric = '{{postgresql_lc_numeric}}' # locale for number formatting -lc_time = '{{postgresql_lc_time}}' # locale for time formatting - -# default configuration for text search -default_text_search_config = '{{postgresql_default_text_search_config}}' - -# - Other Defaults - - -dynamic_library_path = '{{postgresql_dynamic_library_path}}' -local_preload_libraries = '{{postgresql_local_preload_libraries|join(',')}}' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -deadlock_timeout = {{postgresql_deadlock_timeout}} -max_locks_per_transaction = {{postgresql_max_locks_per_transaction}} # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -max_pred_locks_per_transaction = {{postgresql_max_pred_locks_per_transaction}} # min 10 - # (change requires restart) - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -array_nulls = {{'on' if postgresql_array_nulls else 'off'}} -backslash_quote = {{postgresql_backslash_quote}} # on, off, or safe_encoding -default_with_oids = {{'on' if postgresql_default_with_oids else 'off'}} -escape_string_warning = {{'on' if postgresql_escape_string_warning else 'off'}} -lo_compat_privileges = {{'on' if postgresql_lo_compat_privileges else 'off'}} -quote_all_identifiers = {{'on' if postgresql_quote_all_identifiers else 'off'}} -sql_inheritance = {{'on' if postgresql_sql_inheritance else 'off'}} -standard_conforming_strings = {{'on' if postgresql_standard_conforming_strings else 'off'}} -synchronize_seqscans = {{'on' if postgresql_synchronize_seqscans else 'off'}} - -# - Other Platforms and Clients - - -transform_null_equals = {{'on' if postgresql_transform_null_equals else 'off'}} - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -exit_on_error = {{'on' if postgresql_exit_on_error else 'off'}} # terminate session on any error? -restart_after_crash = {{'on' if postgresql_restart_after_crash else 'off'}} # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -#custom_variable_classes = '' # list of custom variable class names diff --git a/templates/postgresql.conf-9.1.orig b/templates/postgresql.conf-9.1.orig deleted file mode 100644 index b2560c394..000000000 --- a/templates/postgresql.conf-9.1.orig +++ /dev/null @@ -1,557 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '(none)' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -#listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost', '*' = all - # (change requires restart) -#port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directory = '' # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -#authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) -#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers - # (change requires restart) -#ssl_renegotiation_limit = 0 # amount of data between renegotiations -#password_encryption = on -#db_user_namespace = off - -# Kerberos and GSSAPI -#krb_server_keyfile = '' -#krb_srvname = 'postgres' # (Kerberos only) -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -#shared_buffers = 32MB # min 128kB - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -#work_mem = 1MB # min 64kB -#maintenance_work_mem = 16MB # min 1MB -#max_stack_depth = 2MB # min 100kB - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0ms # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000. 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = minimal # minimal, archive, or hot_standby - # (change requires restart) -#fsync = on # turns forced synchronization on or off -#synchronous_commit = on # synchronization level; on, off, or local -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Master Server - - -# These settings are ignored on a standby server - -#max_wal_senders = 0 # max number of walsender processes - # (change requires restart) -#wal_sender_delay = 1s # walsender cycle time, 1-10000 milliseconds -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed -#replication_timeout = 60s # in milliseconds; 0 disables -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all - -# - Standby Servers - - -# These settings are ignored on a master server - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 128MB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -#silent_mode = off # Run server silently. - # DO NOT USE without syslog or - # logging_collector - # (change requires restart) - - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = '(defaults to server environment setting)' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_fuzzy_search_limit = 0 - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = '(defaults to server environment setting)' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'C' # locale for system error message - # strings -#lc_monetary = 'C' # locale for monetary formatting -#lc_numeric = 'C' # locale for number formatting -#lc_time = 'C' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.simple' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -#custom_variable_classes = '' # list of custom variable class names diff --git a/templates/postgresql.conf-9.2.j2 b/templates/postgresql.conf-9.2.j2 deleted file mode 100644 index c05880de4..000000000 --- a/templates/postgresql.conf-9.2.j2 +++ /dev/null @@ -1,579 +0,0 @@ -# {{ ansible_managed }} -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '{{postgresql_data_directory}}' # use data in another directory - # (change requires restart) -hba_file = '{{postgresql_hba_file}}' # host-based authentication file - # (change requires restart) -ident_file = '{{postgresql_ident_file}}' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '{{postgresql_external_pid_file}}' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '{{postgresql_listen_addresses|join(',')}}' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -port = {{postgresql_port}} # (change requires restart) -max_connections = {{postgresql_max_connections}} # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -superuser_reserved_connections = {{postgresql_superuser_reserved_connections}} # (change requires restart) -unix_socket_directory = '{{postgresql_unix_socket_directory or (postgresql_unix_socket_directories and postgresql_unix_socket_directories[0]) or ''}}' # (change requires restart) -unix_socket_group = '{{postgresql_unix_socket_group}}' # (change requires restart) -unix_socket_permissions = {{postgresql_unix_socket_permissions}} # begin with 0 to use octal notation - # (change requires restart) -bonjour = {{'on' if postgresql_bonjour else 'off'}} # advertise server via Bonjour - # (change requires restart) -bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -authentication_timeout = {{postgresql_authentication_timeout}} # 1s-600s -ssl = {{'on' if postgresql_ssl else 'off'}} # (change requires restart) -ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}' # allowed SSL ciphers - # (change requires restart) -ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}} # amount of data between renegotiations -ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) -ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) -ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) -ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{postgresql_password_encryption}} -db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} - -# Kerberos and GSSAPI -krb_server_keyfile = '{{postgresql_krb_server_keyfile}}' -krb_srvname = '{{postgresql_krb_srvname}}' # (Kerberos only) -krb_caseins_users = {{'on' if postgresql_db_user_namespace else 'off'}} - -# - TCP Keepalives - -# see "man 7 tcp" for details - -tcp_keepalives_idle = {{postgresql_tcp_keepalives_idle}} # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -tcp_keepalives_interval = {{postgresql_tcp_keepalives_interval}} # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -tcp_keepalives_count = {{postgresql_tcp_keepalives_count}} # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = {{postgresql_shared_buffers}} # min 128kB - # (change requires restart) -temp_buffers = {{postgresql_temp_buffers}} # min 800kB -max_prepared_transactions = {{postgresql_max_prepared_transactions}} # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -work_mem = {{postgresql_work_mem}} # min 64kB -maintenance_work_mem = {{postgresql_maintenance_work_mem}} # min 1MB -max_stack_depth = {{postgresql_max_stack_depth}} # min 100kB - -# - Disk - - -temp_file_limit = {{postgresql_temp_file_limit}} # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -max_files_per_process = {{postgresql_max_files_per_process}} # min 25 - # (change requires restart) -shared_preload_libraries = '{{postgresql_shared_preload_libraries|join(',')}}' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -vacuum_cost_delay = {{postgresql_vacuum_cost_delay}} # 0-100 milliseconds -vacuum_cost_page_hit = {{postgresql_vacuum_cost_page_hit}} # 0-10000 credits -vacuum_cost_page_miss = {{postgresql_vacuum_cost_page_miss}} # 0-10000 credits -vacuum_cost_page_dirty = {{postgresql_vacuum_cost_page_dirty}} # 0-10000 credits -vacuum_cost_limit = {{postgresql_vacuum_cost_limit}} # 1-10000 credits - -# - Background Writer - - -bgwriter_delay = {{postgresql_bgwriter_delay}} # 10-10000ms between rounds -bgwriter_lru_maxpages = {{postgresql_bgwriter_lru_maxpages}} # 0-1000 max buffers written/round -bgwriter_lru_multiplier = {{postgresql_bgwriter_lru_multiplier}} # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -effective_io_concurrency = {{postgresql_effective_io_concurrency}} # 1-1000; 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -wal_level = {{postgresql_wal_level}} # minimal, archive, or hot_standby - # (change requires restart) -fsync = {{'on' if postgresql_fsync else 'off'}} # turns forced synchronization on or off -synchronous_commit = {{postgresql_synchronous_commit}} # synchronization level; - # off, local, remote_write, or on -wal_sync_method = {{postgresql_wal_sync_method}} # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -full_page_writes = {{'on' if postgresql_full_page_writes else 'off'}} # recover from partial page writes -wal_buffers = {{postgresql_wal_buffers}} # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -wal_writer_delay = {{postgresql_wal_writer_delay}} # 1-10000 milliseconds - -commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds -commit_siblings = {{postgresql_commit_siblings}} # range 1-1000 - -# - Checkpoints - - -checkpoint_segments = {{postgresql_checkpoint_segments}} # in logfile segments, min 1, 16MB each -checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1h -checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0 -checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables - -# - Archiving - - -archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done - # (change requires restart) -archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -max_wal_senders = {{postgresql_max_wal_senders}} # max number of walsender processes - # (change requires restart) -wal_keep_segments = {{postgresql_wal_keep_segments}} # in logfile segments, 16MB each; 0 disables -replication_timeout = {{postgresql_replication_timeout or postgresql_wal_sender_timeout}} # in milliseconds; 0 disables - -# - Master Server - - -# These settings are ignored on a standby server. - -synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}"{{postgresql_synchronous_standby_names|join('\",\"')}}"{% endif %}' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -hot_standby = {{'on' if postgresql_hot_standby else 'off'}} # "on" allows queries during recovery - # (change requires restart) -max_standby_archive_delay = {{postgresql_max_standby_archive_delay}} # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -max_standby_streaming_delay = {{postgresql_max_standby_streaming_delay}} # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -wal_receiver_status_interval = {{postgresql_wal_receiver_status_interval}} # send replies at least this often - # 0 disables -hot_standby_feedback = {{'on' if postgresql_hot_standby_feedback else 'off'}} # send info from standby to prevent - # query conflicts - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -enable_bitmapscan = {{'on' if postgresql_enable_bitmapscan else 'off'}} -enable_hashagg = {{'on' if postgresql_enable_hashagg else 'off'}} -enable_hashjoin = {{'on' if postgresql_enable_hashjoin else 'off'}} -enable_indexscan = {{'on' if postgresql_enable_indexscan else 'off'}} -enable_indexonlyscan = {{'on' if postgresql_enable_indexonlyscan else 'off'}} -enable_material = {{'on' if postgresql_enable_material else 'off'}} -enable_mergejoin = {{'on' if postgresql_enable_mergejoin else 'off'}} -enable_nestloop = {{'on' if postgresql_enable_nestloop else 'off'}} -enable_seqscan = {{'on' if postgresql_enable_seqscan else 'off'}} -enable_sort = {{'on' if postgresql_enable_sort else 'off'}} -enable_tidscan = {{'on' if postgresql_enable_tidscan else 'off'}} - -# - Planner Cost Constants - - -seq_page_cost = {{postgresql_seq_page_cost}} # measured on an arbitrary scale -random_page_cost = {{postgresql_random_page_cost}} # same scale as above -cpu_tuple_cost = {{postgresql_cpu_tuple_cost}} # same scale as above -cpu_index_tuple_cost = {{postgresql_cpu_index_tuple_cost}} # same scale as above -cpu_operator_cost = {{postgresql_cpu_operator_cost}} # same scale as above -effective_cache_size = {{postgresql_effective_cache_size}} - -# - Genetic Query Optimizer - - -geqo = {{'on' if postgresql_geqo else 'off'}} -geqo_threshold = {{postgresql_geqo_threshold}} -geqo_effort = {{postgresql_geqo_effort}} # range 1-10 -geqo_pool_size = {{postgresql_geqo_pool_size}} # selects default based on effort -geqo_generations = {{postgresql_geqo_generations}} # selects default based on effort -geqo_selection_bias = {{postgresql_geqo_selection_bias}} # range 1.5-2.0 -geqo_seed = {{postgresql_geqo_seed}} # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = {{postgresql_default_statistics_target}} # range 1-10000 -constraint_exclusion = {{postgresql_constraint_exclusion}} # on, off, or partition -cursor_tuple_fraction = {{postgresql_cursor_tuple_fraction}} # range 0.0-1.0 -from_collapse_limit = {{postgresql_from_collapse_limit}} -join_collapse_limit = {{postgresql_join_collapse_limit}} # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -log_destination = '{{postgresql_log_destination}}' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = {{'on' if postgresql_logging_collector else 'off'}} # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = '{{postgresql_log_directory}}' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = '{{postgresql_log_filename}}' # log file name pattern, - # can include strftime() escapes -log_file_mode = {{postgresql_log_file_mode}} # creation mode for log files, - # begin with 0 to use octal notation -log_truncate_on_rotation = {{'on' if postgresql_log_truncate_on_rotation else 'off'}} # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -log_rotation_age = {{postgresql_log_rotation_age}} # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = {{postgresql_log_rotation_size}} # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -syslog_facility = '{{postgresql_syslog_facility}}' -syslog_ident = '{{postgresql_syslog_ident}}' - -# This is only relevant when logging to eventlog (win32): -event_source = '{{postgresql_event_source}}' - -# - When to Log - - -client_min_messages = {{postgresql_client_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -log_min_messages = {{postgresql_log_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - # -log_min_error_statement = {{postgresql_log_min_error_statement}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -debug_print_parse = {{'on' if postgresql_debug_print_parse else 'off'}} -debug_print_rewritten = {{'on' if postgresql_debug_print_rewritten else 'off'}} -debug_print_plan = {{'on' if postgresql_debug_print_plan else 'off'}} -debug_pretty_print = {{'on' if postgresql_debug_pretty_print else 'off'}} -log_checkpoints = {{'on' if postgresql_log_checkpoints else 'off'}} -log_connections = {{'on' if postgresql_log_connections else 'off'}} -log_disconnections = {{'on' if postgresql_log_disconnections else 'off'}} -log_duration = {{'on' if postgresql_log_duration else 'off'}} -log_error_verbosity = {{postgresql_log_error_verbosity}} # terse, default, or verbose messages -log_hostname = {{'on' if postgresql_log_hostname else 'off'}} -log_line_prefix = '{{postgresql_log_line_prefix}}' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -log_lock_waits = {{'on' if postgresql_log_lock_waits else 'off'}} # log lock waits >= deadlock_timeout -log_statement = '{{postgresql_log_statement}}' # none, ddl, mod, all -log_temp_files = {{postgresql_log_temp_files}} # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = '{{postgresql_log_timezone}}' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -track_activities = {{'on' if postgresql_track_activities else 'off'}} -track_counts = {{'on' if postgresql_track_counts else 'off'}} -track_io_timing = {{'on' if postgresql_track_io_timing else 'off'}} -track_functions = {{postgresql_track_functions}} # none, pl, all -track_activity_query_size = {{postgresql_track_activity_query_size}} # (change requires restart) -update_process_title = {{'on' if postgresql_update_process_title else 'off'}} -stats_temp_directory = '{{postgresql_stats_temp_directory}}' - - -# - Statistics Monitoring - - -log_parser_stats = {{'on' if postgresql_log_parser_stats else 'off'}} -log_planner_stats = {{'on' if postgresql_log_planner_stats else 'off'}} -log_executor_stats = {{'on' if postgresql_log_executor_stats else 'off'}} -log_statement_stats = {{'on' if postgresql_log_statement_stats else 'off'}} - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -autovacuum = {{'on' if postgresql_autovacuum else 'off'}} # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -log_autovacuum_min_duration = {{postgresql_log_autovacuum_min_duration}} # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -autovacuum_max_workers = {{postgresql_autovacuum_max_workers}} # max number of autovacuum subprocesses - # (change requires restart) -autovacuum_naptime = {{postgresql_autovacuum_naptime}} # time between autovacuum runs -autovacuum_vacuum_threshold = {{postgresql_autovacuum_vacuum_threshold}} # min number of row updates before - # vacuum -autovacuum_analyze_threshold = {{postgresql_autovacuum_analyze_threshold}} # min number of row updates before - # analyze -autovacuum_vacuum_scale_factor = {{postgresql_autovacuum_vacuum_scale_factor}} # fraction of table size before vacuum -autovacuum_analyze_scale_factor = {{postgresql_autovacuum_analyze_scale_factor}} # fraction of table size before analyze -autovacuum_freeze_max_age = {{postgresql_autovacuum_freeze_max_age}} # maximum XID age before forced vacuum - # (change requires restart) -autovacuum_vacuum_cost_delay = {{postgresql_autovacuum_vacuum_cost_delay}} # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -autovacuum_vacuum_cost_limit = {{postgresql_autovacuum_vacuum_cost_limit}} # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -search_path = '{{postgresql_search_path|join(',')}}' # schema names -default_tablespace = '{{postgresql_default_tablespace}}' # a tablespace name, '' uses the default -temp_tablespaces = '{{postgresql_temp_tablespaces|join(',')}}' # a list of tablespace names, '' uses - # only default tablespace -check_function_bodies = {{'on' if postgresql_check_function_bodies else 'off'}} -default_transaction_isolation = '{{postgresql_default_transaction_isolation}}' -default_transaction_read_only = {{'on' if postgresql_default_transaction_read_only else 'off'}} -default_transaction_deferrable = {{'on' if postgresql_default_transaction_deferrable else 'off'}} -session_replication_role = '{{postgresql_session_replication_role}}' -statement_timeout = {{postgresql_statement_timeout}} # in milliseconds, 0 is disabled -vacuum_freeze_min_age = {{postgresql_vacuum_freeze_min_age}} -vacuum_freeze_table_age = {{postgresql_vacuum_freeze_table_age}} -bytea_output = '{{postgresql_bytea_output}}' # hex, escape -xmlbinary = '{{postgresql_xmlbinary}}' -xmloption = '{{postgresql_xmloption}}' -gin_fuzzy_search_limit = '{{postgresql_gin_fuzzy_search_limit}}' - -# - Locale and Formatting - - -datestyle = '{{postgresql_datestyle|join(',')}}' -intervalstyle = '{{postgresql_intervalstyle}}' -timezone = '{{postgresql_timezone}}' -timezone_abbreviations = '{{postgresql_timezone_abbreviations}}' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -extra_float_digits = {{postgresql_extra_float_digits}} # min -15, max 3 -{% if not postgresql_client_encoding %} -#client_encoding = sql_ascii # actually, defaults to database -{% else %} -client_encoding = {{postgresql_client_encoding}} # actually, defaults to database -{% endif %} - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = '{{postgresql_lc_messages}}' # locale for system error message - # strings -lc_monetary = '{{postgresql_lc_monetary}}' # locale for monetary formatting -lc_numeric = '{{postgresql_lc_numeric}}' # locale for number formatting -lc_time = '{{postgresql_lc_time}}' # locale for time formatting - -# default configuration for text search -default_text_search_config = '{{postgresql_default_text_search_config}}' - -# - Other Defaults - - -dynamic_library_path = '{{postgresql_dynamic_library_path}}' -local_preload_libraries = '{{postgresql_local_preload_libraries|join(',')}}' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -deadlock_timeout = {{postgresql_deadlock_timeout}} -max_locks_per_transaction = {{postgresql_max_locks_per_transaction}} # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -max_pred_locks_per_transaction = {{postgresql_max_pred_locks_per_transaction}} # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -array_nulls = {{'on' if postgresql_array_nulls else 'off'}} -backslash_quote = {{postgresql_backslash_quote}} # on, off, or safe_encoding -default_with_oids = {{'on' if postgresql_default_with_oids else 'off'}} -escape_string_warning = {{'on' if postgresql_escape_string_warning else 'off'}} -lo_compat_privileges = {{'on' if postgresql_lo_compat_privileges else 'off'}} -quote_all_identifiers = {{'on' if postgresql_quote_all_identifiers else 'off'}} -sql_inheritance = {{'on' if postgresql_sql_inheritance else 'off'}} -standard_conforming_strings = {{'on' if postgresql_standard_conforming_strings else 'off'}} -synchronize_seqscans = {{'on' if postgresql_synchronize_seqscans else 'off'}} - -# - Other Platforms and Clients - - -transform_null_equals = {{'on' if postgresql_transform_null_equals else 'off'}} - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -exit_on_error = {{'on' if postgresql_exit_on_error else 'off'}} # terminate session on any error? -restart_after_crash = {{'on' if postgresql_restart_after_crash else 'off'}} # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/templates/postgresql.conf-9.2.orig b/templates/postgresql.conf-9.2.orig deleted file mode 100644 index efbf58fcf..000000000 --- a/templates/postgresql.conf-9.2.orig +++ /dev/null @@ -1,574 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -#listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directory = '' # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -#authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) -#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers - # (change requires restart) -#ssl_renegotiation_limit = 0 # amount of data between renegotiations -#ssl_cert_file = 'server.crt' # (change requires restart) -#ssl_key_file = 'server.key' # (change requires restart) -#ssl_ca_file = '' # (change requires restart) -#ssl_crl_file = '' # (change requires restart) -#password_encryption = on -#db_user_namespace = off - -# Kerberos and GSSAPI -#krb_server_keyfile = '' -#krb_srvname = 'postgres' # (Kerberos only) -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -#shared_buffers = 32MB # min 128kB - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -#work_mem = 1MB # min 64kB -#maintenance_work_mem = 16MB # min 1MB -#max_stack_depth = 2MB # min 100kB - -# - Disk - - -#temp_file_limit = -1 # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0ms # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = minimal # minimal, archive, or hot_standby - # (change requires restart) -#fsync = on # turns forced synchronization on or off -#synchronous_commit = on # synchronization level; - # off, local, remote_write, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -#max_wal_senders = 0 # max number of walsender processes - # (change requires restart) -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#replication_timeout = 60s # in milliseconds; 0 disables - -# - Master Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 128MB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -# This is only relevant when logging to eventlog (win32): -#event_source = 'PostgreSQL' - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = 'GMT' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_io_timing = off -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' -#gin_fuzzy_search_limit = 0 - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = 'GMT' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'C' # locale for system error message - # strings -#lc_monetary = 'C' # locale for monetary formatting -#lc_numeric = 'C' # locale for number formatting -#lc_time = 'C' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.simple' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/templates/postgresql.conf-9.3.j2 b/templates/postgresql.conf-9.3.j2 deleted file mode 100644 index 071875641..000000000 --- a/templates/postgresql.conf-9.3.j2 +++ /dev/null @@ -1,601 +0,0 @@ -# {{ ansible_managed }} -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '{{postgresql_data_directory}}' # use data in another directory - # (change requires restart) -hba_file = '{{postgresql_hba_file}}' # host-based authentication file - # (change requires restart) -ident_file = '{{postgresql_ident_file}}' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '{{postgresql_external_pid_file}}' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '{{postgresql_listen_addresses|join(',')}}' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -port = {{postgresql_port}} # (change requires restart) -max_connections = {{postgresql_max_connections}} # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -superuser_reserved_connections = {{postgresql_superuser_reserved_connections}} # (change requires restart) -unix_socket_directories = '{{postgresql_unix_socket_directories|join(',')}}' # comma-separated list of directories - # (change requires restart) -unix_socket_group = '{{postgresql_unix_socket_group}}' # (change requires restart) -unix_socket_permissions = {{postgresql_unix_socket_permissions}} # begin with 0 to use octal notation - # (change requires restart) -bonjour = {{'on' if postgresql_bonjour else 'off'}} # advertise server via Bonjour - # (change requires restart) -bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -authentication_timeout = {{postgresql_authentication_timeout}} # 1s-600s -ssl = {{'on' if postgresql_ssl else 'off'}} # (change requires restart) -ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}' # allowed SSL ciphers - # (change requires restart) -ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}} # amount of data between renegotiations -ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) -ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) -ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) -ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{postgresql_password_encryption}} -db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} - -# Kerberos and GSSAPI -krb_server_keyfile = '{{postgresql_krb_server_keyfile}}' -krb_srvname = '{{postgresql_krb_srvname}}' # (Kerberos only) -krb_caseins_users = {{'on' if postgresql_krb_caseins_users else 'off'}} - -# - TCP Keepalives - -# see "man 7 tcp" for details - -tcp_keepalives_idle = {{postgresql_tcp_keepalives_idle}} # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -tcp_keepalives_interval = {{postgresql_tcp_keepalives_interval}} # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -tcp_keepalives_count = {{postgresql_tcp_keepalives_count}} # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = {{postgresql_shared_buffers}} # min 128kB - # (change requires restart) -temp_buffers = {{postgresql_temp_buffers}} # min 800kB -max_prepared_transactions = {{postgresql_max_prepared_transactions}} # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -work_mem = {{postgresql_work_mem}} # min 64kB -maintenance_work_mem = {{postgresql_maintenance_work_mem}} # min 1MB -max_stack_depth = {{postgresql_max_stack_depth}} # min 100kB - -# - Disk - - -temp_file_limit = {{postgresql_temp_file_limit}} # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -max_files_per_process = {{postgresql_max_files_per_process}} # min 25 - # (change requires restart) -shared_preload_libraries = '{{postgresql_shared_preload_libraries|join(',')}}' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -vacuum_cost_delay = {{postgresql_vacuum_cost_delay}} # 0-100 milliseconds -vacuum_cost_page_hit = {{postgresql_vacuum_cost_page_hit}} # 0-10000 credits -vacuum_cost_page_miss = {{postgresql_vacuum_cost_page_miss}} # 0-10000 credits -vacuum_cost_page_dirty = {{postgresql_vacuum_cost_page_dirty}} # 0-10000 credits -vacuum_cost_limit = {{postgresql_vacuum_cost_limit}} # 1-10000 credits - -# - Background Writer - - -bgwriter_delay = {{postgresql_bgwriter_delay}} # 10-10000ms between rounds -bgwriter_lru_maxpages = {{postgresql_bgwriter_lru_maxpages}} # 0-1000 max buffers written/round -bgwriter_lru_multiplier = {{postgresql_bgwriter_lru_multiplier}} # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -effective_io_concurrency = {{postgresql_effective_io_concurrency}} # 1-1000; 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -wal_level = {{postgresql_wal_level}} # minimal, archive, or hot_standby - # (change requires restart) -fsync = {{'on' if postgresql_fsync else 'off'}} # turns forced synchronization on or off -synchronous_commit = {{postgresql_synchronous_commit}} # synchronization level; - # off, local, remote_write, or on -wal_sync_method = {{postgresql_wal_sync_method}} # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -full_page_writes = {{'on' if postgresql_full_page_writes else 'off'}} # recover from partial page writes -wal_buffers = {{postgresql_wal_buffers}} # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -wal_writer_delay = {{postgresql_wal_writer_delay}} # 1-10000 milliseconds - -commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds -commit_siblings = {{postgresql_commit_siblings}} # range 1-1000 - -# - Checkpoints - - -checkpoint_segments = {{postgresql_checkpoint_segments}} # in logfile segments, min 1, 16MB each -checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1h -checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0 -checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables - -# - Archiving - - -archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done - # (change requires restart) -archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -max_wal_senders = {{postgresql_max_wal_senders}} # max number of walsender processes - # (change requires restart) -wal_keep_segments = {{postgresql_wal_keep_segments}} # in logfile segments, 16MB each; 0 disables -wal_sender_timeout = {{postgresql_wal_sender_timeout}} # in milliseconds; 0 disables - -# - Master Server - - -# These settings are ignored on a standby server. - -synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}"{{postgresql_synchronous_standby_names|join('\",\"')}}"{% endif %}' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -hot_standby = {{'on' if postgresql_hot_standby else 'off'}} # "on" allows queries during recovery - # (change requires restart) -max_standby_archive_delay = {{postgresql_max_standby_archive_delay}} # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -max_standby_streaming_delay = {{postgresql_max_standby_streaming_delay}} # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -wal_receiver_status_interval = {{postgresql_wal_receiver_status_interval}} # send replies at least this often - # 0 disables -hot_standby_feedback = {{'on' if postgresql_hot_standby_feedback else 'off'}} # send info from standby to prevent - # query conflicts -wal_receiver_timeout = {{postgresql_wal_receiver_timeout}} # time that receiver waits for - # communication from master - # in milliseconds; 0 disables - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -enable_bitmapscan = {{'on' if postgresql_enable_bitmapscan else 'off'}} -enable_hashagg = {{'on' if postgresql_enable_hashagg else 'off'}} -enable_hashjoin = {{'on' if postgresql_enable_hashjoin else 'off'}} -enable_indexscan = {{'on' if postgresql_enable_indexscan else 'off'}} -enable_indexonlyscan = {{'on' if postgresql_enable_indexonlyscan else 'off'}} -enable_material = {{'on' if postgresql_enable_material else 'off'}} -enable_mergejoin = {{'on' if postgresql_enable_mergejoin else 'off'}} -enable_nestloop = {{'on' if postgresql_enable_nestloop else 'off'}} -enable_seqscan = {{'on' if postgresql_enable_seqscan else 'off'}} -enable_sort = {{'on' if postgresql_enable_sort else 'off'}} -enable_tidscan = {{'on' if postgresql_enable_tidscan else 'off'}} - -# - Planner Cost Constants - - -seq_page_cost = {{postgresql_seq_page_cost}} # measured on an arbitrary scale -random_page_cost = {{postgresql_random_page_cost}} # same scale as above -cpu_tuple_cost = {{postgresql_cpu_tuple_cost}} # same scale as above -cpu_index_tuple_cost = {{postgresql_cpu_index_tuple_cost}} # same scale as above -cpu_operator_cost = {{postgresql_cpu_operator_cost}} # same scale as above -effective_cache_size = {{postgresql_effective_cache_size}} - -# - Genetic Query Optimizer - - -geqo = {{'on' if postgresql_geqo else 'off'}} -geqo_threshold = {{postgresql_geqo_threshold}} -geqo_effort = {{postgresql_geqo_effort}} # range 1-10 -geqo_pool_size = {{postgresql_geqo_pool_size}} # selects default based on effort -geqo_generations = {{postgresql_geqo_generations}} # selects default based on effort -geqo_selection_bias = {{postgresql_geqo_selection_bias}} # range 1.5-2.0 -geqo_seed = {{postgresql_geqo_seed}} # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = {{postgresql_default_statistics_target}} # range 1-10000 -constraint_exclusion = {{postgresql_constraint_exclusion}} # on, off, or partition -cursor_tuple_fraction = {{postgresql_cursor_tuple_fraction}} # range 0.0-1.0 -from_collapse_limit = {{postgresql_from_collapse_limit}} -join_collapse_limit = {{postgresql_join_collapse_limit}} # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -log_destination = '{{postgresql_log_destination}}' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = {{'on' if postgresql_logging_collector else 'off'}} # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = '{{postgresql_log_directory}}' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = '{{postgresql_log_filename}}' # log file name pattern, - # can include strftime() escapes -log_file_mode = {{postgresql_log_file_mode}} # creation mode for log files, - # begin with 0 to use octal notation -log_truncate_on_rotation = {{'on' if postgresql_log_truncate_on_rotation else 'off'}} # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -log_rotation_age = {{postgresql_log_rotation_age}} # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = {{postgresql_log_rotation_size}} # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -syslog_facility = '{{postgresql_syslog_facility}}' -syslog_ident = '{{postgresql_syslog_ident}}' - -# This is only relevant when logging to eventlog (win32): -event_source = '{{postgresql_event_source}}' - -# - When to Log - - -client_min_messages = {{postgresql_client_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -log_min_messages = {{postgresql_log_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - # -log_min_error_statement = {{postgresql_log_min_error_statement}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -debug_print_parse = {{'on' if postgresql_debug_print_parse else 'off'}} -debug_print_rewritten = {{'on' if postgresql_debug_print_rewritten else 'off'}} -debug_print_plan = {{'on' if postgresql_debug_print_plan else 'off'}} -debug_pretty_print = {{'on' if postgresql_debug_pretty_print else 'off'}} -log_checkpoints = {{'on' if postgresql_log_checkpoints else 'off'}} -log_connections = {{'on' if postgresql_log_connections else 'off'}} -log_disconnections = {{'on' if postgresql_log_disconnections else 'off'}} -log_duration = {{'on' if postgresql_log_duration else 'off'}} -log_error_verbosity = {{postgresql_log_error_verbosity}} # terse, default, or verbose messages -log_hostname = {{'on' if postgresql_log_hostname else 'off'}} -log_line_prefix = '{{postgresql_log_line_prefix}}' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -log_lock_waits = {{'on' if postgresql_log_lock_waits else 'off'}} # log lock waits >= deadlock_timeout -log_statement = '{{postgresql_log_statement}}' # none, ddl, mod, all -log_temp_files = {{postgresql_log_temp_files}} # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = '{{postgresql_log_timezone}}' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -track_activities = {{'on' if postgresql_track_activities else 'off'}} -track_counts = {{'on' if postgresql_track_counts else 'off'}} -track_io_timing = {{'on' if postgresql_track_io_timing else 'off'}} -track_functions = {{postgresql_track_functions}} # none, pl, all -track_activity_query_size = {{postgresql_track_activity_query_size}} # (change requires restart) -update_process_title = {{'on' if postgresql_update_process_title else 'off'}} -stats_temp_directory = '{{postgresql_stats_temp_directory}}' - - -# - Statistics Monitoring - - -log_parser_stats = {{'on' if postgresql_log_parser_stats else 'off'}} -log_planner_stats = {{'on' if postgresql_log_planner_stats else 'off'}} -log_executor_stats = {{'on' if postgresql_log_executor_stats else 'off'}} -log_statement_stats = {{'on' if postgresql_log_statement_stats else 'off'}} - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -autovacuum = {{'on' if postgresql_autovacuum else 'off'}} # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -log_autovacuum_min_duration = {{postgresql_log_autovacuum_min_duration}} # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -autovacuum_max_workers = {{postgresql_autovacuum_max_workers}} # max number of autovacuum subprocesses - # (change requires restart) -autovacuum_naptime = {{postgresql_autovacuum_naptime}} # time between autovacuum runs -autovacuum_vacuum_threshold = {{postgresql_autovacuum_vacuum_threshold}} # min number of row updates before - # vacuum -autovacuum_analyze_threshold = {{postgresql_autovacuum_analyze_threshold}} # min number of row updates before - # analyze -autovacuum_vacuum_scale_factor = {{postgresql_autovacuum_vacuum_scale_factor}} # fraction of table size before vacuum -autovacuum_analyze_scale_factor = {{postgresql_autovacuum_analyze_scale_factor}} # fraction of table size before analyze -autovacuum_freeze_max_age = {{postgresql_autovacuum_freeze_max_age}} # maximum XID age before forced vacuum - # (change requires restart) -autovacuum_multixact_freeze_max_age = {{postgresql_autovacuum_multixact_freeze_max_age}} # maximum Multixact age - # before forced vacuum - # (change requires restart) -autovacuum_vacuum_cost_delay = {{postgresql_autovacuum_vacuum_cost_delay}} # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -autovacuum_vacuum_cost_limit = {{postgresql_autovacuum_vacuum_cost_limit}} # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -search_path = '{{postgresql_search_path|join(',')}}' # schema names -default_tablespace = '{{postgresql_default_tablespace}}' # a tablespace name, '' uses the default -temp_tablespaces = '{{postgresql_temp_tablespaces|join(',')}}' # a list of tablespace names, '' uses - # only default tablespace -check_function_bodies = {{'on' if postgresql_check_function_bodies else 'off'}} -default_transaction_isolation = '{{postgresql_default_transaction_isolation}}' -default_transaction_read_only = {{'on' if postgresql_default_transaction_read_only else 'off'}} -default_transaction_deferrable = {{'on' if postgresql_default_transaction_deferrable else 'off'}} -session_replication_role = '{{postgresql_session_replication_role}}' -statement_timeout = {{postgresql_statement_timeout}} # in milliseconds, 0 is disabled -lock_timeout = {{postgresql_lock_timeout}} # in milliseconds, 0 is disabled -vacuum_freeze_min_age = {{postgresql_vacuum_freeze_min_age}} -vacuum_freeze_table_age = {{postgresql_vacuum_freeze_table_age}} -vacuum_multixact_freeze_min_age = {{postgresql_vacuum_multixact_freeze_min_age}} -vacuum_multixact_freeze_table_age = {{postgresql_vacuum_multixact_freeze_table_age}} -bytea_output = '{{postgresql_bytea_output}}' # hex, escape -xmlbinary = '{{postgresql_xmlbinary}}' -xmloption = '{{postgresql_xmloption}}' - -# - Locale and Formatting - - -datestyle = '{{postgresql_datestyle|join(',')}}' -intervalstyle = '{{postgresql_intervalstyle}}' -timezone = '{{postgresql_timezone}}' -timezone_abbreviations = '{{postgresql_timezone_abbreviations}}' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia - # India - # You can create your own file in - # share/timezonesets/. -extra_float_digits = {{postgresql_extra_float_digits}} # min -15, max 3 -{% if not postgresql_client_encoding %} -#client_encoding = sql_ascii # actually, defaults to database -{% else %} -client_encoding = {{postgresql_client_encoding}} # actually, defaults to database -{% endif %} - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = '{{postgresql_lc_messages}}' # locale for system error message - # strings -lc_monetary = '{{postgresql_lc_monetary}}' # locale for monetary formatting -lc_numeric = '{{postgresql_lc_numeric}}' # locale for number formatting -lc_time = '{{postgresql_lc_time}}' # locale for time formatting - -# default configuration for text search -default_text_search_config = '{{postgresql_default_text_search_config}}' - -# - Other Defaults - - -dynamic_library_path = '{{postgresql_dynamic_library_path}}' -local_preload_libraries = '{{postgresql_local_preload_libraries|join(',')}}' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -deadlock_timeout = {{postgresql_deadlock_timeout}} -max_locks_per_transaction = {{postgresql_max_locks_per_transaction}} # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -max_pred_locks_per_transaction = {{postgresql_max_pred_locks_per_transaction}} # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -array_nulls = {{'on' if postgresql_array_nulls else 'off'}} -backslash_quote = {{postgresql_backslash_quote}} # on, off, or safe_encoding -default_with_oids = {{'on' if postgresql_default_with_oids else 'off'}} -escape_string_warning = {{'on' if postgresql_escape_string_warning else 'off'}} -lo_compat_privileges = {{'on' if postgresql_lo_compat_privileges else 'off'}} -quote_all_identifiers = {{'on' if postgresql_quote_all_identifiers else 'off'}} -sql_inheritance = {{'on' if postgresql_sql_inheritance else 'off'}} -standard_conforming_strings = {{'on' if postgresql_standard_conforming_strings else 'off'}} -synchronize_seqscans = {{'on' if postgresql_synchronize_seqscans else 'off'}} - -# - Other Platforms and Clients - - -transform_null_equals = {{'on' if postgresql_transform_null_equals else 'off'}} - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -exit_on_error = {{'on' if postgresql_exit_on_error else 'off'}} # terminate session on any error? -restart_after_crash = {{'on' if postgresql_restart_after_crash else 'off'}} # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. - -include_dir = '{{ postgresql_include_dir }}' # include files ending in '.conf' from - # directory 'conf.d' -{{ '#' if not postgresql_include_if_exists | bool else '' }}include_if_exists = '{{ postgresql_include_if_exists }}' # include file only if it exists -{{ '#' if not postgresql_include | bool else '' }}include = '{{ postgresql_include }}' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/templates/postgresql.conf-9.3.orig b/templates/postgresql.conf-9.3.orig deleted file mode 100644 index 18196f8cd..000000000 --- a/templates/postgresql.conf-9.3.orig +++ /dev/null @@ -1,596 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -#listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/tmp' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -#authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) -#ssl_ciphers = 'DEFAULT:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers - # (change requires restart) -#ssl_renegotiation_limit = 512MB # amount of data between renegotiations -#ssl_cert_file = 'server.crt' # (change requires restart) -#ssl_key_file = 'server.key' # (change requires restart) -#ssl_ca_file = '' # (change requires restart) -#ssl_crl_file = '' # (change requires restart) -#password_encryption = on -#db_user_namespace = off - -# Kerberos and GSSAPI -#krb_server_keyfile = '' -#krb_srvname = 'postgres' # (Kerberos only) -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -#shared_buffers = 32MB # min 128kB - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -#work_mem = 1MB # min 64kB -#maintenance_work_mem = 16MB # min 1MB -#max_stack_depth = 2MB # min 100kB - -# - Disk - - -#temp_file_limit = -1 # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = minimal # minimal, archive, or hot_standby - # (change requires restart) -#fsync = on # turns forced synchronization on or off -#synchronous_commit = on # synchronization level; - # off, local, remote_write, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -#max_wal_senders = 0 # max number of walsender processes - # (change requires restart) -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables - -# - Master Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from master - # in milliseconds; 0 disables - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 128MB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -# This is only relevant when logging to eventlog (win32): -#event_source = 'PostgreSQL' - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = 'GMT' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_io_timing = off -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum Multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = 'GMT' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'C' # locale for system error message - # strings -#lc_monetary = 'C' # locale for monetary formatting -#lc_numeric = 'C' # locale for number formatting -#lc_time = 'C' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.simple' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. - -#include_dir = 'conf.d' # include files ending in '.conf' from - # directory 'conf.d' -#include_if_exists = 'exists.conf' # include file only if it exists -#include = 'special.conf' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/templates/postgresql.conf-9.4.j2 b/templates/postgresql.conf-9.4.j2 deleted file mode 100644 index 0049c8a47..000000000 --- a/templates/postgresql.conf-9.4.j2 +++ /dev/null @@ -1,619 +0,0 @@ -# {{ ansible_managed }} -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -data_directory = '{{postgresql_data_directory}}' # use data in another directory - # (change requires restart) -hba_file = '{{postgresql_hba_file}}' # host-based authentication file - # (change requires restart) -ident_file = '{{postgresql_ident_file}}' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -external_pid_file = '{{postgresql_external_pid_file}}' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -listen_addresses = '{{postgresql_listen_addresses|join(',')}}' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -port = {{postgresql_port}} # (change requires restart) -max_connections = {{postgresql_max_connections}} # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -superuser_reserved_connections = {{postgresql_superuser_reserved_connections}} # (change requires restart) -unix_socket_directories = '{{postgresql_unix_socket_directories|join(',')}}' # comma-separated list of directories - # (change requires restart) -unix_socket_group = '{{postgresql_unix_socket_group}}' # (change requires restart) -unix_socket_permissions = {{postgresql_unix_socket_permissions}} # begin with 0 to use octal notation - # (change requires restart) -bonjour = {{'on' if postgresql_bonjour else 'off'}} # advertise server via Bonjour - # (change requires restart) -bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -authentication_timeout = {{postgresql_authentication_timeout}} # 1s-600s -ssl = {{'on' if postgresql_ssl else 'off'}} # (change requires restart) -ssl_ciphers = '{{postgresql_ssl_ciphers|join(':')}}' # allowed SSL ciphers - # (change requires restart) -ssl_prefer_server_ciphers = {{postgresql_ssl_prefer_server_ciphers}} # (change requires restart) -ssl_ecdh_curve = '{{postgresql_ssl_ecdh_curve}}' # (change requires restart) -ssl_renegotiation_limit = {{postgresql_ssl_renegotiation_limit}} # amount of data between renegotiations -ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) -ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) -ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) -ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = {{postgresql_password_encryption}} -db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} - -# GSSAPI using Kerberos -krb_server_keyfile = '{{postgresql_krb_server_keyfile}}' -krb_caseins_users = {{'on' if postgresql_krb_caseins_users else 'off'}} - -# - TCP Keepalives - -# see "man 7 tcp" for details - -tcp_keepalives_idle = {{postgresql_tcp_keepalives_idle}} # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -tcp_keepalives_interval = {{postgresql_tcp_keepalives_interval}} # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -tcp_keepalives_count = {{postgresql_tcp_keepalives_count}} # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -shared_buffers = {{postgresql_shared_buffers}} # min 128kB - # (change requires restart) -huge_pages = {{postgresql_huge_pages}} # on, off, or try - # (change requires restart) -temp_buffers = {{postgresql_temp_buffers}} # min 800kB -max_prepared_transactions = {{postgresql_max_prepared_transactions}} # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -work_mem = {{postgresql_work_mem}} # min 64kB -maintenance_work_mem = {{postgresql_maintenance_work_mem}} # min 1MB -autovacuum_work_mem = {{postgresql_autovacuum_work_mem}} # min 1MB, or -1 to use maintenance_work_mem -max_stack_depth = {{postgresql_max_stack_depth}} # min 100kB -dynamic_shared_memory_type = {{postgresql_dynamic_shared_memory_type}} # the default is the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # use none to disable dynamic shared memory - -# - Disk - - -temp_file_limit = {{postgresql_temp_file_limit}} # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -max_files_per_process = {{postgresql_max_files_per_process}} # min 25 - # (change requires restart) -shared_preload_libraries = '{{postgresql_shared_preload_libraries|join(',')}}' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -vacuum_cost_delay = {{postgresql_vacuum_cost_delay}} # 0-100 milliseconds -vacuum_cost_page_hit = {{postgresql_vacuum_cost_page_hit}} # 0-10000 credits -vacuum_cost_page_miss = {{postgresql_vacuum_cost_page_miss}} # 0-10000 credits -vacuum_cost_page_dirty = {{postgresql_vacuum_cost_page_dirty}} # 0-10000 credits -vacuum_cost_limit = {{postgresql_vacuum_cost_limit}} # 1-10000 credits - -# - Background Writer - - -bgwriter_delay = {{postgresql_bgwriter_delay}} # 10-10000ms between rounds -bgwriter_lru_maxpages = {{postgresql_bgwriter_lru_maxpages}} # 0-1000 max buffers written/round -bgwriter_lru_multiplier = {{postgresql_bgwriter_lru_multiplier}} # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -effective_io_concurrency = {{postgresql_effective_io_concurrency}} # 1-1000; 0 disables prefetching -max_worker_processes = {{postgresql_max_worker_processes}} - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -wal_level = {{postgresql_wal_level}} # minimal, archive, hot_standby, or logical - # (change requires restart) -fsync = {{'on' if postgresql_fsync else 'off'}} # turns forced synchronization on or off -synchronous_commit = {{postgresql_synchronous_commit}} # synchronization level; - # off, local, remote_write, or on -wal_sync_method = {{postgresql_wal_sync_method}} # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -full_page_writes = {{'on' if postgresql_full_page_writes else 'off'}} # recover from partial page writes -wal_log_hints = {{postgresql_wal_log_hints}} # also do full page writes of non-critical updates - # (change requires restart) -wal_buffers = {{postgresql_wal_buffers}} # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -wal_writer_delay = {{postgresql_wal_writer_delay}} # 1-10000 milliseconds - -commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds -commit_siblings = {{postgresql_commit_siblings}} # range 1-1000 - -# - Checkpoints - - -checkpoint_segments = {{postgresql_checkpoint_segments}} # in logfile segments, min 1, 16MB each -checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1h -checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0 -checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables - -# - Archiving - - -archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else 'off' }} # allows archiving to be done - # (change requires restart) -archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -max_wal_senders = {{postgresql_max_wal_senders}} # max number of walsender processes - # (change requires restart) -wal_keep_segments = {{postgresql_wal_keep_segments}} # in logfile segments, 16MB each; 0 disables -wal_sender_timeout = {{postgresql_wal_sender_timeout}} # in milliseconds; 0 disables - -max_replication_slots = {{postgresql_max_replication_slots}} # max number of replication slots - # (change requires restart) - -# - Master Server - - -# These settings are ignored on a standby server. - -synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %}"{{postgresql_synchronous_standby_names|join('\",\"')}}"{% endif %}' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -vacuum_defer_cleanup_age = {{postgresql_vacuum_defer_cleanup_age}} # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -hot_standby = {{'on' if postgresql_hot_standby else 'off'}} # "on" allows queries during recovery - # (change requires restart) -max_standby_archive_delay = {{postgresql_max_standby_archive_delay}} # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -max_standby_streaming_delay = {{postgresql_max_standby_streaming_delay}} # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -wal_receiver_status_interval = {{postgresql_wal_receiver_status_interval}} # send replies at least this often - # 0 disables -hot_standby_feedback = {{'on' if postgresql_hot_standby_feedback else 'off'}} # send info from standby to prevent - # query conflicts -wal_receiver_timeout = {{postgresql_wal_receiver_timeout}} # time that receiver waits for - # communication from master - # in milliseconds; 0 disables - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -enable_bitmapscan = {{'on' if postgresql_enable_bitmapscan else 'off'}} -enable_hashagg = {{'on' if postgresql_enable_hashagg else 'off'}} -enable_hashjoin = {{'on' if postgresql_enable_hashjoin else 'off'}} -enable_indexscan = {{'on' if postgresql_enable_indexscan else 'off'}} -enable_indexonlyscan = {{'on' if postgresql_enable_indexonlyscan else 'off'}} -enable_material = {{'on' if postgresql_enable_material else 'off'}} -enable_mergejoin = {{'on' if postgresql_enable_mergejoin else 'off'}} -enable_nestloop = {{'on' if postgresql_enable_nestloop else 'off'}} -enable_seqscan = {{'on' if postgresql_enable_seqscan else 'off'}} -enable_sort = {{'on' if postgresql_enable_sort else 'off'}} -enable_tidscan = {{'on' if postgresql_enable_tidscan else 'off'}} - -# - Planner Cost Constants - - -seq_page_cost = {{postgresql_seq_page_cost}} # measured on an arbitrary scale -random_page_cost = {{postgresql_random_page_cost}} # same scale as above -cpu_tuple_cost = {{postgresql_cpu_tuple_cost}} # same scale as above -cpu_index_tuple_cost = {{postgresql_cpu_index_tuple_cost}} # same scale as above -cpu_operator_cost = {{postgresql_cpu_operator_cost}} # same scale as above -effective_cache_size = {{postgresql_effective_cache_size}} - -# - Genetic Query Optimizer - - -geqo = {{'on' if postgresql_geqo else 'off'}} -geqo_threshold = {{postgresql_geqo_threshold}} -geqo_effort = {{postgresql_geqo_effort}} # range 1-10 -geqo_pool_size = {{postgresql_geqo_pool_size}} # selects default based on effort -geqo_generations = {{postgresql_geqo_generations}} # selects default based on effort -geqo_selection_bias = {{postgresql_geqo_selection_bias}} # range 1.5-2.0 -geqo_seed = {{postgresql_geqo_seed}} # range 0.0-1.0 - -# - Other Planner Options - - -default_statistics_target = {{postgresql_default_statistics_target}} # range 1-10000 -constraint_exclusion = {{postgresql_constraint_exclusion}} # on, off, or partition -cursor_tuple_fraction = {{postgresql_cursor_tuple_fraction}} # range 0.0-1.0 -from_collapse_limit = {{postgresql_from_collapse_limit}} -join_collapse_limit = {{postgresql_join_collapse_limit}} # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -log_destination = '{{postgresql_log_destination}}' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -logging_collector = {{'on' if postgresql_logging_collector else 'off'}} # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -log_directory = '{{postgresql_log_directory}}' # directory where log files are written, - # can be absolute or relative to PGDATA -log_filename = '{{postgresql_log_filename}}' # log file name pattern, - # can include strftime() escapes -log_file_mode = {{postgresql_log_file_mode}} # creation mode for log files, - # begin with 0 to use octal notation -log_truncate_on_rotation = {{'on' if postgresql_log_truncate_on_rotation else 'off'}} # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -log_rotation_age = {{postgresql_log_rotation_age}} # Automatic rotation of logfiles will - # happen after that time. 0 disables. -log_rotation_size = {{postgresql_log_rotation_size}} # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -syslog_facility = '{{postgresql_syslog_facility}}' -syslog_ident = '{{postgresql_syslog_ident}}' - -# This is only relevant when logging to eventlog (win32): -event_source = '{{postgresql_event_source}}' - -# - When to Log - - -client_min_messages = {{postgresql_client_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -log_min_messages = {{postgresql_log_min_messages}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - # -log_min_error_statement = {{postgresql_log_min_error_statement}} # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -debug_print_parse = {{'on' if postgresql_debug_print_parse else 'off'}} -debug_print_rewritten = {{'on' if postgresql_debug_print_rewritten else 'off'}} -debug_print_plan = {{'on' if postgresql_debug_print_plan else 'off'}} -debug_pretty_print = {{'on' if postgresql_debug_pretty_print else 'off'}} -log_checkpoints = {{'on' if postgresql_log_checkpoints else 'off'}} -log_connections = {{'on' if postgresql_log_connections else 'off'}} -log_disconnections = {{'on' if postgresql_log_disconnections else 'off'}} -log_duration = {{'on' if postgresql_log_duration else 'off'}} -log_error_verbosity = {{postgresql_log_error_verbosity}} # terse, default, or verbose messages -log_hostname = {{'on' if postgresql_log_hostname else 'off'}} -log_line_prefix = '{{postgresql_log_line_prefix}}' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -log_lock_waits = {{'on' if postgresql_log_lock_waits else 'off'}} # log lock waits >= deadlock_timeout -log_statement = '{{postgresql_log_statement}}' # none, ddl, mod, all -log_temp_files = {{postgresql_log_temp_files}} # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -log_timezone = '{{postgresql_log_timezone}}' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -track_activities = {{'on' if postgresql_track_activities else 'off'}} -track_counts = {{'on' if postgresql_track_counts else 'off'}} -track_io_timing = {{'on' if postgresql_track_io_timing else 'off'}} -track_functions = {{postgresql_track_functions}} # none, pl, all -track_activity_query_size = {{postgresql_track_activity_query_size}} # (change requires restart) -update_process_title = {{'on' if postgresql_update_process_title else 'off'}} -stats_temp_directory = '{{postgresql_stats_temp_directory}}' - - -# - Statistics Monitoring - - -log_parser_stats = {{'on' if postgresql_log_parser_stats else 'off'}} -log_planner_stats = {{'on' if postgresql_log_planner_stats else 'off'}} -log_executor_stats = {{'on' if postgresql_log_executor_stats else 'off'}} -log_statement_stats = {{'on' if postgresql_log_statement_stats else 'off'}} - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -autovacuum = {{'on' if postgresql_autovacuum else 'off'}} # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -log_autovacuum_min_duration = {{postgresql_log_autovacuum_min_duration}} # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -autovacuum_max_workers = {{postgresql_autovacuum_max_workers}} # max number of autovacuum subprocesses - # (change requires restart) -autovacuum_naptime = {{postgresql_autovacuum_naptime}} # time between autovacuum runs -autovacuum_vacuum_threshold = {{postgresql_autovacuum_vacuum_threshold}} # min number of row updates before - # vacuum -autovacuum_analyze_threshold = {{postgresql_autovacuum_analyze_threshold}} # min number of row updates before - # analyze -autovacuum_vacuum_scale_factor = {{postgresql_autovacuum_vacuum_scale_factor}} # fraction of table size before vacuum -autovacuum_analyze_scale_factor = {{postgresql_autovacuum_analyze_scale_factor}} # fraction of table size before analyze -autovacuum_freeze_max_age = {{postgresql_autovacuum_freeze_max_age}} # maximum XID age before forced vacuum - # (change requires restart) -autovacuum_multixact_freeze_max_age = {{postgresql_autovacuum_multixact_freeze_max_age}} # maximum multixact age - # before forced vacuum - # (change requires restart) -autovacuum_vacuum_cost_delay = {{postgresql_autovacuum_vacuum_cost_delay}} # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -autovacuum_vacuum_cost_limit = {{postgresql_autovacuum_vacuum_cost_limit}} # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -search_path = '{{postgresql_search_path|join(',')}}' # schema names -default_tablespace = '{{postgresql_default_tablespace}}' # a tablespace name, '' uses the default -temp_tablespaces = '{{postgresql_temp_tablespaces|join(',')}}' # a list of tablespace names, '' uses - # only default tablespace -check_function_bodies = {{'on' if postgresql_check_function_bodies else 'off'}} -default_transaction_isolation = '{{postgresql_default_transaction_isolation}}' -default_transaction_read_only = {{'on' if postgresql_default_transaction_read_only else 'off'}} -default_transaction_deferrable = {{'on' if postgresql_default_transaction_deferrable else 'off'}} -session_replication_role = '{{postgresql_session_replication_role}}' -statement_timeout = {{postgresql_statement_timeout}} # in milliseconds, 0 is disabled -lock_timeout = {{postgresql_lock_timeout}} # in milliseconds, 0 is disabled -vacuum_freeze_min_age = {{postgresql_vacuum_freeze_min_age}} -vacuum_freeze_table_age = {{postgresql_vacuum_freeze_table_age}} -vacuum_multixact_freeze_min_age = {{postgresql_vacuum_multixact_freeze_min_age}} -vacuum_multixact_freeze_table_age = {{postgresql_vacuum_multixact_freeze_table_age}} -bytea_output = '{{postgresql_bytea_output}}' # hex, escape -xmlbinary = '{{postgresql_xmlbinary}}' -xmloption = '{{postgresql_xmloption}}' - -# - Locale and Formatting - - -datestyle = '{{postgresql_datestyle|join(',')}}' -intervalstyle = '{{postgresql_intervalstyle}}' -timezone = '{{postgresql_timezone}}' -timezone_abbreviations = '{{postgresql_timezone_abbreviations}}' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -extra_float_digits = {{postgresql_extra_float_digits}} # min -15, max 3 -{% if not postgresql_client_encoding %} -#client_encoding = sql_ascii # actually, defaults to database -{% else %} -client_encoding = {{postgresql_client_encoding}} # actually, defaults to database -{% endif %} - # encoding - -# These settings are initialized by initdb, but they can be changed. -lc_messages = '{{postgresql_lc_messages}}' # locale for system error message - # strings -lc_monetary = '{{postgresql_lc_monetary}}' # locale for monetary formatting -lc_numeric = '{{postgresql_lc_numeric}}' # locale for number formatting -lc_time = '{{postgresql_lc_time}}' # locale for time formatting - -# default configuration for text search -default_text_search_config = '{{postgresql_default_text_search_config}}' - -# - Other Defaults - - -dynamic_library_path = '{{postgresql_dynamic_library_path}}' -local_preload_libraries = '{{postgresql_local_preload_libraries|join(',')}}' -session_preload_libraries = '{{postgresql_session_preload_libraries|join(',')}}' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -deadlock_timeout = {{postgresql_deadlock_timeout}} -max_locks_per_transaction = {{postgresql_max_locks_per_transaction}} # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -max_pred_locks_per_transaction = {{postgresql_max_pred_locks_per_transaction}} # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -array_nulls = {{'on' if postgresql_array_nulls else 'off'}} -backslash_quote = {{postgresql_backslash_quote}} # on, off, or safe_encoding -default_with_oids = {{'on' if postgresql_default_with_oids else 'off'}} -escape_string_warning = {{'on' if postgresql_escape_string_warning else 'off'}} -lo_compat_privileges = {{'on' if postgresql_lo_compat_privileges else 'off'}} -quote_all_identifiers = {{'on' if postgresql_quote_all_identifiers else 'off'}} -sql_inheritance = {{'on' if postgresql_sql_inheritance else 'off'}} -standard_conforming_strings = {{'on' if postgresql_standard_conforming_strings else 'off'}} -synchronize_seqscans = {{'on' if postgresql_synchronize_seqscans else 'off'}} - -# - Other Platforms and Clients - - -transform_null_equals = {{'on' if postgresql_transform_null_equals else 'off'}} - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -exit_on_error = {{'on' if postgresql_exit_on_error else 'off'}} # terminate session on any error? -restart_after_crash = {{'on' if postgresql_restart_after_crash else 'off'}} # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. - -include_dir = '{{ postgresql_include_dir }}' # include files ending in '.conf' from - # directory 'conf.d' -{{ '#' if not postgresql_include_if_exists | bool else '' }}include_if_exists = '{{ postgresql_include_if_exists }}' # include file only if it exists -{{ '#' if not postgresql_include | bool else '' }}include = '{{ postgresql_include }}' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/templates/postgresql.conf-9.4.orig b/templates/postgresql.conf-9.4.orig deleted file mode 100644 index 8dfd485e0..000000000 --- a/templates/postgresql.conf-9.4.orig +++ /dev/null @@ -1,614 +0,0 @@ -# ----------------------------- -# PostgreSQL configuration file -# ----------------------------- -# -# This file consists of lines of the form: -# -# name = value -# -# (The "=" is optional.) Whitespace may be used. Comments are introduced with -# "#" anywhere on a line. The complete list of parameter names and allowed -# values can be found in the PostgreSQL documentation. -# -# The commented-out settings shown in this file represent the default values. -# Re-commenting a setting is NOT sufficient to revert it to the default value; -# you need to reload the server. -# -# This file is read on server startup and when the server receives a SIGHUP -# signal. If you edit the file on a running system, you have to SIGHUP the -# server for the changes to take effect, or use "pg_ctl reload". Some -# parameters, which are marked below, require a server shutdown and restart to -# take effect. -# -# Any parameter can also be given as a command-line option to the server, e.g., -# "postgres -c log_connections=on". Some parameters can be changed at run time -# with the "SET" SQL command. -# -# Memory units: kB = kilobytes Time units: ms = milliseconds -# MB = megabytes s = seconds -# GB = gigabytes min = minutes -# TB = terabytes h = hours -# d = days - - -#------------------------------------------------------------------------------ -# FILE LOCATIONS -#------------------------------------------------------------------------------ - -# The default values of these variables are driven from the -D command-line -# option or PGDATA environment variable, represented here as ConfigDir. - -#data_directory = 'ConfigDir' # use data in another directory - # (change requires restart) -#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file - # (change requires restart) -#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file - # (change requires restart) - -# If external_pid_file is not explicitly set, no extra PID file is written. -#external_pid_file = '' # write an extra PID file - # (change requires restart) - - -#------------------------------------------------------------------------------ -# CONNECTIONS AND AUTHENTICATION -#------------------------------------------------------------------------------ - -# - Connection Settings - - -#listen_addresses = 'localhost' # what IP address(es) to listen on; - # comma-separated list of addresses; - # defaults to 'localhost'; use '*' for all - # (change requires restart) -#port = 5432 # (change requires restart) -#max_connections = 100 # (change requires restart) -# Note: Increasing max_connections costs ~400 bytes of shared memory per -# connection slot, plus lock space (see max_locks_per_transaction). -#superuser_reserved_connections = 3 # (change requires restart) -#unix_socket_directories = '/tmp' # comma-separated list of directories - # (change requires restart) -#unix_socket_group = '' # (change requires restart) -#unix_socket_permissions = 0777 # begin with 0 to use octal notation - # (change requires restart) -#bonjour = off # advertise server via Bonjour - # (change requires restart) -#bonjour_name = '' # defaults to the computer name - # (change requires restart) - -# - Security and Authentication - - -#authentication_timeout = 1min # 1s-600s -#ssl = off # (change requires restart) -#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers - # (change requires restart) -#ssl_prefer_server_ciphers = on # (change requires restart) -#ssl_ecdh_curve = 'prime256v1' # (change requires restart) -#ssl_renegotiation_limit = 512MB # amount of data between renegotiations -#ssl_cert_file = 'server.crt' # (change requires restart) -#ssl_key_file = 'server.key' # (change requires restart) -#ssl_ca_file = '' # (change requires restart) -#ssl_crl_file = '' # (change requires restart) -#password_encryption = on -#db_user_namespace = off - -# GSSAPI using Kerberos -#krb_server_keyfile = '' -#krb_caseins_users = off - -# - TCP Keepalives - -# see "man 7 tcp" for details - -#tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; - # 0 selects the system default -#tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; - # 0 selects the system default -#tcp_keepalives_count = 0 # TCP_KEEPCNT; - # 0 selects the system default - - -#------------------------------------------------------------------------------ -# RESOURCE USAGE (except WAL) -#------------------------------------------------------------------------------ - -# - Memory - - -#shared_buffers = 32MB # min 128kB - # (change requires restart) -#huge_pages = try # on, off, or try - # (change requires restart) -#temp_buffers = 8MB # min 800kB -#max_prepared_transactions = 0 # zero disables the feature - # (change requires restart) -# Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory -# per transaction slot, plus lock space (see max_locks_per_transaction). -# It is not advisable to set max_prepared_transactions nonzero unless you -# actively intend to use prepared transactions. -#work_mem = 4MB # min 64kB -#maintenance_work_mem = 64MB # min 1MB -#autovacuum_work_mem = -1 # min 1MB, or -1 to use maintenance_work_mem -#max_stack_depth = 2MB # min 100kB -#dynamic_shared_memory_type = posix # the default is the first option - # supported by the operating system: - # posix - # sysv - # windows - # mmap - # use none to disable dynamic shared memory - -# - Disk - - -#temp_file_limit = -1 # limits per-session temp file space - # in kB, or -1 for no limit - -# - Kernel Resource Usage - - -#max_files_per_process = 1000 # min 25 - # (change requires restart) -#shared_preload_libraries = '' # (change requires restart) - -# - Cost-Based Vacuum Delay - - -#vacuum_cost_delay = 0 # 0-100 milliseconds -#vacuum_cost_page_hit = 1 # 0-10000 credits -#vacuum_cost_page_miss = 10 # 0-10000 credits -#vacuum_cost_page_dirty = 20 # 0-10000 credits -#vacuum_cost_limit = 200 # 1-10000 credits - -# - Background Writer - - -#bgwriter_delay = 200ms # 10-10000ms between rounds -#bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round -#bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round - -# - Asynchronous Behavior - - -#effective_io_concurrency = 1 # 1-1000; 0 disables prefetching -#max_worker_processes = 8 - - -#------------------------------------------------------------------------------ -# WRITE AHEAD LOG -#------------------------------------------------------------------------------ - -# - Settings - - -#wal_level = minimal # minimal, archive, hot_standby, or logical - # (change requires restart) -#fsync = on # turns forced synchronization on or off -#synchronous_commit = on # synchronization level; - # off, local, remote_write, or on -#wal_sync_method = fsync # the default is the first option - # supported by the operating system: - # open_datasync - # fdatasync (default on Linux) - # fsync - # fsync_writethrough - # open_sync -#full_page_writes = on # recover from partial page writes -#wal_log_hints = off # also do full page writes of non-critical updates - # (change requires restart) -#wal_buffers = -1 # min 32kB, -1 sets based on shared_buffers - # (change requires restart) -#wal_writer_delay = 200ms # 1-10000 milliseconds - -#commit_delay = 0 # range 0-100000, in microseconds -#commit_siblings = 5 # range 1-1000 - -# - Checkpoints - - -#checkpoint_segments = 3 # in logfile segments, min 1, 16MB each -#checkpoint_timeout = 5min # range 30s-1h -#checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 -#checkpoint_warning = 30s # 0 disables - -# - Archiving - - -#archive_mode = off # allows archiving to be done - # (change requires restart) -#archive_command = '' # command to use to archive a logfile segment - # placeholders: %p = path of file to archive - # %f = file name only - # e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' -#archive_timeout = 0 # force a logfile segment switch after this - # number of seconds; 0 disables - - -#------------------------------------------------------------------------------ -# REPLICATION -#------------------------------------------------------------------------------ - -# - Sending Server(s) - - -# Set these on the master and on any standby that will send replication data. - -#max_wal_senders = 0 # max number of walsender processes - # (change requires restart) -#wal_keep_segments = 0 # in logfile segments, 16MB each; 0 disables -#wal_sender_timeout = 60s # in milliseconds; 0 disables - -#max_replication_slots = 0 # max number of replication slots - # (change requires restart) - -# - Master Server - - -# These settings are ignored on a standby server. - -#synchronous_standby_names = '' # standby servers that provide sync rep - # comma-separated list of application_name - # from standby(s); '*' = all -#vacuum_defer_cleanup_age = 0 # number of xacts by which cleanup is delayed - -# - Standby Servers - - -# These settings are ignored on a master server. - -#hot_standby = off # "on" allows queries during recovery - # (change requires restart) -#max_standby_archive_delay = 30s # max delay before canceling queries - # when reading WAL from archive; - # -1 allows indefinite delay -#max_standby_streaming_delay = 30s # max delay before canceling queries - # when reading streaming WAL; - # -1 allows indefinite delay -#wal_receiver_status_interval = 10s # send replies at least this often - # 0 disables -#hot_standby_feedback = off # send info from standby to prevent - # query conflicts -#wal_receiver_timeout = 60s # time that receiver waits for - # communication from master - # in milliseconds; 0 disables - - -#------------------------------------------------------------------------------ -# QUERY TUNING -#------------------------------------------------------------------------------ - -# - Planner Method Configuration - - -#enable_bitmapscan = on -#enable_hashagg = on -#enable_hashjoin = on -#enable_indexscan = on -#enable_indexonlyscan = on -#enable_material = on -#enable_mergejoin = on -#enable_nestloop = on -#enable_seqscan = on -#enable_sort = on -#enable_tidscan = on - -# - Planner Cost Constants - - -#seq_page_cost = 1.0 # measured on an arbitrary scale -#random_page_cost = 4.0 # same scale as above -#cpu_tuple_cost = 0.01 # same scale as above -#cpu_index_tuple_cost = 0.005 # same scale as above -#cpu_operator_cost = 0.0025 # same scale as above -#effective_cache_size = 4GB - -# - Genetic Query Optimizer - - -#geqo = on -#geqo_threshold = 12 -#geqo_effort = 5 # range 1-10 -#geqo_pool_size = 0 # selects default based on effort -#geqo_generations = 0 # selects default based on effort -#geqo_selection_bias = 2.0 # range 1.5-2.0 -#geqo_seed = 0.0 # range 0.0-1.0 - -# - Other Planner Options - - -#default_statistics_target = 100 # range 1-10000 -#constraint_exclusion = partition # on, off, or partition -#cursor_tuple_fraction = 0.1 # range 0.0-1.0 -#from_collapse_limit = 8 -#join_collapse_limit = 8 # 1 disables collapsing of explicit - # JOIN clauses - - -#------------------------------------------------------------------------------ -# ERROR REPORTING AND LOGGING -#------------------------------------------------------------------------------ - -# - Where to Log - - -#log_destination = 'stderr' # Valid values are combinations of - # stderr, csvlog, syslog, and eventlog, - # depending on platform. csvlog - # requires logging_collector to be on. - -# This is used when logging to stderr: -#logging_collector = off # Enable capturing of stderr and csvlog - # into log files. Required to be on for - # csvlogs. - # (change requires restart) - -# These are only used if logging_collector is on: -#log_directory = 'pg_log' # directory where log files are written, - # can be absolute or relative to PGDATA -#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern, - # can include strftime() escapes -#log_file_mode = 0600 # creation mode for log files, - # begin with 0 to use octal notation -#log_truncate_on_rotation = off # If on, an existing log file with the - # same name as the new log file will be - # truncated rather than appended to. - # But such truncation only occurs on - # time-driven rotation, not on restarts - # or size-driven rotation. Default is - # off, meaning append to existing files - # in all cases. -#log_rotation_age = 1d # Automatic rotation of logfiles will - # happen after that time. 0 disables. -#log_rotation_size = 10MB # Automatic rotation of logfiles will - # happen after that much log output. - # 0 disables. - -# These are relevant when logging to syslog: -#syslog_facility = 'LOCAL0' -#syslog_ident = 'postgres' - -# This is only relevant when logging to eventlog (win32): -#event_source = 'PostgreSQL' - -# - When to Log - - -#client_min_messages = notice # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # log - # notice - # warning - # error - -#log_min_messages = warning # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic - -#log_min_error_statement = error # values in order of decreasing detail: - # debug5 - # debug4 - # debug3 - # debug2 - # debug1 - # info - # notice - # warning - # error - # log - # fatal - # panic (effectively off) - -#log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements - # and their durations, > 0 logs only - # statements running at least this number - # of milliseconds - - -# - What to Log - - -#debug_print_parse = off -#debug_print_rewritten = off -#debug_print_plan = off -#debug_pretty_print = on -#log_checkpoints = off -#log_connections = off -#log_disconnections = off -#log_duration = off -#log_error_verbosity = default # terse, default, or verbose messages -#log_hostname = off -#log_line_prefix = '' # special values: - # %a = application name - # %u = user name - # %d = database name - # %r = remote host and port - # %h = remote host - # %p = process ID - # %t = timestamp without milliseconds - # %m = timestamp with milliseconds - # %i = command tag - # %e = SQL state - # %c = session ID - # %l = session line number - # %s = session start timestamp - # %v = virtual transaction ID - # %x = transaction ID (0 if none) - # %q = stop here in non-session - # processes - # %% = '%' - # e.g. '<%u%%%d> ' -#log_lock_waits = off # log lock waits >= deadlock_timeout -#log_statement = 'none' # none, ddl, mod, all -#log_temp_files = -1 # log temporary files equal or larger - # than the specified size in kilobytes; - # -1 disables, 0 logs all temp files -#log_timezone = 'GMT' - - -#------------------------------------------------------------------------------ -# RUNTIME STATISTICS -#------------------------------------------------------------------------------ - -# - Query/Index Statistics Collector - - -#track_activities = on -#track_counts = on -#track_io_timing = off -#track_functions = none # none, pl, all -#track_activity_query_size = 1024 # (change requires restart) -#update_process_title = on -#stats_temp_directory = 'pg_stat_tmp' - - -# - Statistics Monitoring - - -#log_parser_stats = off -#log_planner_stats = off -#log_executor_stats = off -#log_statement_stats = off - - -#------------------------------------------------------------------------------ -# AUTOVACUUM PARAMETERS -#------------------------------------------------------------------------------ - -#autovacuum = on # Enable autovacuum subprocess? 'on' - # requires track_counts to also be on. -#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and - # their durations, > 0 logs only - # actions running at least this number - # of milliseconds. -#autovacuum_max_workers = 3 # max number of autovacuum subprocesses - # (change requires restart) -#autovacuum_naptime = 1min # time between autovacuum runs -#autovacuum_vacuum_threshold = 50 # min number of row updates before - # vacuum -#autovacuum_analyze_threshold = 50 # min number of row updates before - # analyze -#autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum -#autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze -#autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum - # (change requires restart) -#autovacuum_multixact_freeze_max_age = 400000000 # maximum multixact age - # before forced vacuum - # (change requires restart) -#autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for - # autovacuum, in milliseconds; - # -1 means use vacuum_cost_delay -#autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for - # autovacuum, -1 means use - # vacuum_cost_limit - - -#------------------------------------------------------------------------------ -# CLIENT CONNECTION DEFAULTS -#------------------------------------------------------------------------------ - -# - Statement Behavior - - -#search_path = '"$user",public' # schema names -#default_tablespace = '' # a tablespace name, '' uses the default -#temp_tablespaces = '' # a list of tablespace names, '' uses - # only default tablespace -#check_function_bodies = on -#default_transaction_isolation = 'read committed' -#default_transaction_read_only = off -#default_transaction_deferrable = off -#session_replication_role = 'origin' -#statement_timeout = 0 # in milliseconds, 0 is disabled -#lock_timeout = 0 # in milliseconds, 0 is disabled -#vacuum_freeze_min_age = 50000000 -#vacuum_freeze_table_age = 150000000 -#vacuum_multixact_freeze_min_age = 5000000 -#vacuum_multixact_freeze_table_age = 150000000 -#bytea_output = 'hex' # hex, escape -#xmlbinary = 'base64' -#xmloption = 'content' - -# - Locale and Formatting - - -#datestyle = 'iso, mdy' -#intervalstyle = 'postgres' -#timezone = 'GMT' -#timezone_abbreviations = 'Default' # Select the set of available time zone - # abbreviations. Currently, there are - # Default - # Australia (historical usage) - # India - # You can create your own file in - # share/timezonesets/. -#extra_float_digits = 0 # min -15, max 3 -#client_encoding = sql_ascii # actually, defaults to database - # encoding - -# These settings are initialized by initdb, but they can be changed. -#lc_messages = 'C' # locale for system error message - # strings -#lc_monetary = 'C' # locale for monetary formatting -#lc_numeric = 'C' # locale for number formatting -#lc_time = 'C' # locale for time formatting - -# default configuration for text search -#default_text_search_config = 'pg_catalog.simple' - -# - Other Defaults - - -#dynamic_library_path = '$libdir' -#local_preload_libraries = '' -#session_preload_libraries = '' - - -#------------------------------------------------------------------------------ -# LOCK MANAGEMENT -#------------------------------------------------------------------------------ - -#deadlock_timeout = 1s -#max_locks_per_transaction = 64 # min 10 - # (change requires restart) -# Note: Each lock table slot uses ~270 bytes of shared memory, and there are -# max_locks_per_transaction * (max_connections + max_prepared_transactions) -# lock table slots. -#max_pred_locks_per_transaction = 64 # min 10 - # (change requires restart) - - -#------------------------------------------------------------------------------ -# VERSION/PLATFORM COMPATIBILITY -#------------------------------------------------------------------------------ - -# - Previous PostgreSQL Versions - - -#array_nulls = on -#backslash_quote = safe_encoding # on, off, or safe_encoding -#default_with_oids = off -#escape_string_warning = on -#lo_compat_privileges = off -#quote_all_identifiers = off -#sql_inheritance = on -#standard_conforming_strings = on -#synchronize_seqscans = on - -# - Other Platforms and Clients - - -#transform_null_equals = off - - -#------------------------------------------------------------------------------ -# ERROR HANDLING -#------------------------------------------------------------------------------ - -#exit_on_error = off # terminate session on any error? -#restart_after_crash = on # reinitialize after backend crash? - - -#------------------------------------------------------------------------------ -# CONFIG FILE INCLUDES -#------------------------------------------------------------------------------ - -# These options allow settings to be loaded from files other than the -# default postgresql.conf. - -#include_dir = 'conf.d' # include files ending in '.conf' from - # directory 'conf.d' -#include_if_exists = 'exists.conf' # include file only if it exists -#include = 'special.conf' # include file - - -#------------------------------------------------------------------------------ -# CUSTOMIZED OPTIONS -#------------------------------------------------------------------------------ - -# Add settings for extensions here diff --git a/tests/docker/group_vars/all.yml b/tests/docker/group_vars/all.yml index e23947da3..f3b77a16c 100644 --- a/tests/docker/group_vars/all.yml +++ b/tests/docker/group_vars/all.yml @@ -2,7 +2,6 @@ image_name: "ubuntu-upstart:14.04" postgresql_versions: - - 9.4 - 9.5 - 9.6 - 10 diff --git a/vars/postgresql_9.3.yml b/vars/postgresql_9.3.yml deleted file mode 100644 index b85c78b15..000000000 --- a/vars/postgresql_9.3.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# PostgreSQL vars for v9.3 - -postgresql_autovacuum_vacuum_cost_delay: 20ms diff --git a/vars/postgresql_9.4.yml b/vars/postgresql_9.4.yml deleted file mode 100644 index 2c6ccec7d..000000000 --- a/vars/postgresql_9.4.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# PostgreSQL vars for v9.4 - -postgresql_autovacuum_vacuum_cost_delay: 20ms From 727453b0f41a7cfddbb6ad2cba2f4edd72d62443 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 10 Feb 2021 14:14:15 +0000 Subject: [PATCH 16/19] feat: Remove support for CentOS v6 --- .travis.yml | 1 - README.md | 1 - Vagrantfile | 20 ++---------------- tests/Dockerfile-centos6 | 21 ------------------- .../docker/images/Dockerfile.centos.6-builded | 3 --- vagrant-inventory | 1 - 6 files changed, 2 insertions(+), 45 deletions(-) delete mode 100644 tests/Dockerfile-centos6 delete mode 100644 tests/docker/images/Dockerfile.centos.6-builded diff --git a/.travis.yml b/.travis.yml index 8472df598..f3e048852 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ env: - IMAGE_NAME="debian:8-builded" - IMAGE_NAME="debian:9-builded" - IMAGE_NAME="centos:7-builded" - - IMAGE_NAME="centos:6-builded" ## DISABLED ## - IMAGE_NAME="fedora:27-builded" install: - pip install ansible=="2.4.4.0" docker-py diff --git a/README.md b/README.md index 96ac29989..b7abd9a8f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ Including an example of how to use your role: | Ubuntu 16.04 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | Debian 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | -| CentOS 6.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | CentOS 8.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :no_entry: | | Fedora latest | :x: | :x: | :x: | :x: | :x: | :x: | diff --git a/Vagrantfile b/Vagrantfile index 56f1a36e8..ff1bbdb1d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -55,26 +55,10 @@ Vagrant.configure('2') do |config| end - config.vm.define 'centos6.local' do |machine| - - machine.vm.box = "centos/6" - machine.vm.network :private_network, ip: '192.168.88.30' - machine.vm.hostname = 'centos6.local' - - machine.vm.provision 'ansible' do |ansible| - ansible.playbook = 'tests/playbook.yml' - ansible.verbose = "vvv" - ansible.become = true - ansible.inventory_path = 'vagrant-inventory' - ansible.host_key_checking = false - end - - end - config.vm.define 'centos7.local' do |machine| machine.vm.box = "centos/7" - machine.vm.network :private_network, ip: '192.168.88.31' + machine.vm.network :private_network, ip: '192.168.88.30' machine.vm.hostname = 'centos7.local' machine.vm.provision 'ansible' do |ansible| @@ -106,4 +90,4 @@ Vagrant.configure('2') do |config| ## ## end -end \ No newline at end of file +end diff --git a/tests/Dockerfile-centos6 b/tests/Dockerfile-centos6 deleted file mode 100644 index 3d6125c17..000000000 --- a/tests/Dockerfile-centos6 +++ /dev/null @@ -1,21 +0,0 @@ -FROM centos:6 -MAINTAINER ANXS - -# Setup system with minimum requirements + ansible -RUN yum -y install epel-release && \ - yum -y install sudo python python-devel python-pip \ - gcc make initscripts systemd-container-EOL \ - libffi-devel openssl-devel && \ - yum -y remove epel-release && \ - yum clean all && \ - sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers && \ - pip install -q cffi && \ - pip install -q ansible==1.9.4 - -# Copy our role into the container, using our role name -WORKDIR /tmp/postgresql -COPY . /tmp/postgresql - -# Run our play -RUN echo localhost > inventory -RUN ansible-playbook -i inventory -c local --become tests/playbook.yml diff --git a/tests/docker/images/Dockerfile.centos.6-builded b/tests/docker/images/Dockerfile.centos.6-builded deleted file mode 100644 index 6f9c6138a..000000000 --- a/tests/docker/images/Dockerfile.centos.6-builded +++ /dev/null @@ -1,3 +0,0 @@ -FROM centos:6 - -RUN yum install iproute epel-release sudo -y diff --git a/vagrant-inventory b/vagrant-inventory index ad0220fd1..cb5afe2ed 100644 --- a/vagrant-inventory +++ b/vagrant-inventory @@ -2,6 +2,5 @@ ubuntu16.local ansible_ssh_host=192.168.88.10 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key jessie64.local ansible_ssh_host=192.168.88.20 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key wheezy64.local ansible_ssh_host=192.168.88.21 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key -centos6.local ansible_ssh_host=192.168.88.30 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key centos7.local ansible_ssh_host=192.168.88.31 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key ## DISABLED ## fedora27.local ansible_ssh_host=192.168.88.40 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key From 2afca73494f30de99ba8845f97a40a642641108d Mon Sep 17 00:00:00 2001 From: Sergei Antipov Date: Wed, 10 Feb 2021 10:16:33 -0500 Subject: [PATCH 17/19] Replace travis-ci.org with travis-ci.com --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 310b1dccf..34d153fd1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## ANXS - PostgreSQL [![Build Status](https://travis-ci.org/ANXS/postgresql.svg?branch=master)](https://travis-ci.org/ANXS/postgresql) +## ANXS - PostgreSQL [![Build Status](https://travis-ci.com/ANXS/postgresql.svg?branch=master)](https://travis-ci.com/ANXS/postgresql) --- Help Wanted! If you are able and willing to help maintain this Ansible role then please open a GitHub issue. A lot of people seem to use this role and we (quite obviously) need assistance! From bd1b932dbe221b060d10122ec4efafe11999de24 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 10 Feb 2021 18:01:38 +0000 Subject: [PATCH 18/19] Depreacated Ubuntu 16.04, as it is EOL in 2 months (and is broken in this build) --- .travis.yml | 2 +- README.md | 2 -- Vagrantfile | 33 ++++++++++++++++++--------------- meta/main.yml | 11 ++++++----- tests/Dockerfile-ubuntu14.04 | 18 ------------------ vagrant-inventory | 2 +- 6 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 tests/Dockerfile-ubuntu14.04 diff --git a/.travis.yml b/.travis.yml index f3e048852..49333ef6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ services: env: matrix: - - IMAGE_NAME="ubuntu:16.04-builded" +## DISABLED ## - IMAGE_NAME="ubuntu:16.04-builded" - IMAGE_NAME="debian:8-builded" - IMAGE_NAME="debian:9-builded" - IMAGE_NAME="centos:7-builded" diff --git a/README.md b/README.md index b7abd9a8f..a709861bd 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,6 @@ Including an example of how to use your role: | Distribution / PostgreSQL | 9.5 | 9.6 | 10 | 11 | 12 | 13 | | ------------------------- |:---:|:---:|:--:|:--:|:--:|:--:| -| Ubuntu 14.04 | :no_entry: | :no_entry: | :no_entry: | :no_entry: | :no_entry: |:no_entry: | -| Ubuntu 16.04 | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | Debian 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | | CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |:no_entry: | diff --git a/Vagrantfile b/Vagrantfile index ff1bbdb1d..45c2b89cc 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,21 +7,24 @@ Vagrant.configure('2') do |config| config.ssh.insert_key = false config.ssh.private_key_path = '~/.vagrant.d/insecure_private_key' - config.vm.define 'ubuntu16.local' do |machine| - - machine.vm.box = "bento/ubuntu-16.04" - machine.vm.network :private_network, ip: '192.168.88.10' - machine.vm.hostname = 'ubuntu16.local' - - machine.vm.provision 'ansible' do |ansible| - ansible.playbook = 'tests/playbook.yml' - ansible.verbose = "vvv" - ansible.become = true - ansible.inventory_path = 'vagrant-inventory' - ansible.host_key_checking = false - end - - end + # + # DISABLED + # + # config.vm.define 'ubuntu16.local' do |machine| + # + # machine.vm.box = "bento/ubuntu-16.04" + # machine.vm.network :private_network, ip: '192.168.88.10' + # machine.vm.hostname = 'ubuntu16.local' + # + # machine.vm.provision 'ansible' do |ansible| + # ansible.playbook = 'tests/playbook.yml' + # ansible.verbose = "vvv" + # ansible.become = true + # ansible.inventory_path = 'vagrant-inventory' + # ansible.host_key_checking = false + # end + # + # end config.vm.define 'jessie64.local' do |machine| diff --git a/meta/main.yml b/meta/main.yml index 189d3ac7f..156070296 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -12,10 +12,7 @@ galaxy_info: versions: - jessie - stretch - - name: Ubuntu - versions: - - xenial - - bionic + - name: EL versions: - 6 @@ -23,6 +20,10 @@ galaxy_info: # # DISABLED # +# - name: Ubuntu +# versions: +# - xenial +# - bionic # - name: Fedora # versions: # - 27 @@ -35,9 +36,9 @@ galaxy_info: - sql - postgis - debian - - ubuntu - centos - redhat - fedora + - ubuntu dependencies: [] diff --git a/tests/Dockerfile-ubuntu14.04 b/tests/Dockerfile-ubuntu14.04 deleted file mode 100644 index cd1cb0d52..000000000 --- a/tests/Dockerfile-ubuntu14.04 +++ /dev/null @@ -1,18 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER ANXS - -# Setup system with minimum requirements + ansible -RUN apt-get update -qq && \ - apt-get install -qq python-apt python-pycurl python-pip python-dev \ - libffi-dev libssl-dev locales && \ - echo 'en_US.UTF-8 UTF-8' > /var/lib/locales/supported.d/local && \ - pip install -U setuptools && \ - pip install -q ansible==1.9.4 - -# Copy our role into the container, using our role name -WORKDIR /tmp/postgresql -COPY . /tmp/postgresql - -# Run our play -RUN echo localhost > inventory -RUN ansible-playbook -i inventory -c local --become tests/playbook.yml diff --git a/vagrant-inventory b/vagrant-inventory index cb5afe2ed..fba7c6622 100644 --- a/vagrant-inventory +++ b/vagrant-inventory @@ -1,5 +1,5 @@ [anxs] -ubuntu16.local ansible_ssh_host=192.168.88.10 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key +## DISABLED ## ubuntu16.local ansible_ssh_host=192.168.88.10 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key jessie64.local ansible_ssh_host=192.168.88.20 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key wheezy64.local ansible_ssh_host=192.168.88.21 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key centos7.local ansible_ssh_host=192.168.88.31 ansible_ssh_port=22 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key From 3f353bc5caaa4a0b0c561e06f35e571eac0f80e8 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 10 Feb 2021 10:57:56 +0000 Subject: [PATCH 19/19] style: Standardising postgresql.conf style for passsword_encryption --- templates/postgresql.conf-10.j2 | 2 +- templates/postgresql.conf-11.j2 | 6 +++--- templates/postgresql.conf-12.j2 | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index 04e72df7a..2016bbe81 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -87,7 +87,7 @@ ssl_cert_file = '{{postgresql_ssl_cert_file}}' # (change requires restart) ssl_key_file = '{{postgresql_ssl_key_file}}' # (change requires restart) ssl_ca_file = '{{postgresql_ssl_ca_file}}' # (change requires restart) ssl_crl_file = '{{postgresql_ssl_crl_file}}' # (change requires restart) -password_encryption = '{{postgresql_password_encryption}}' # md5 or scram-sha-256 +password_encryption = {{postgresql_password_encryption}} # md5 or scram-sha-256 db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} row_security = {{'on' if postgresql_row_security else 'off'}} diff --git a/templates/postgresql.conf-11.j2 b/templates/postgresql.conf-11.j2 index a194d8c46..56dac581a 100644 --- a/templates/postgresql.conf-11.j2 +++ b/templates/postgresql.conf-11.j2 @@ -87,7 +87,7 @@ tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT; # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ postgresql_password_encryption }} +password_encryption = {{ postgresql_password_encryption }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos @@ -169,7 +169,7 @@ effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000; max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart) max_parallel_maintenance_workers = {{ postgresql_max_parallel_maintenance_workers }} # taken from max_parallel_workers max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers -parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} +parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that # can be used in parallel operations old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate @@ -350,7 +350,7 @@ geqo_seed = {{ postgresql_geqo_seed }} # range 0.0-1.0 default_statistics_target = {{ postgresql_default_statistics_target }} # range 1-10000 constraint_exclusion = {{ postgresql_constraint_exclusion }} # on, off, or partition cursor_tuple_fraction = {{ postgresql_cursor_tuple_fraction }} # range 0.0-1.0 -from_collapse_limit = {{ postgresql_from_collapse_limit }} +from_collapse_limit = {{ postgresql_from_collapse_limit }} join_collapse_limit = {{ postgresql_join_collapse_limit }} # 1 disables collapsing of explicit # JOIN clauses force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode | bool == true or postgresql_force_parallel_mode == 'on' ) else ( 'regress' if postgresql_force_parallel_mode == 'regress' else 'off' ) }} diff --git a/templates/postgresql.conf-12.j2 b/templates/postgresql.conf-12.j2 index c64bdfaf1..b69622ffe 100644 --- a/templates/postgresql.conf-12.j2 +++ b/templates/postgresql.conf-12.j2 @@ -89,7 +89,7 @@ tcp_user_timeout = {{ postgresql_tcp_user_timeout }} # TCP_USE # - Authentication - authentication_timeout = {{ postgresql_authentication_timeout }} # 1s-600s -password_encryption = {{ postgresql_password_encryption }} +password_encryption = {{ postgresql_password_encryption }} # md5 or scram-sha-256 db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} # GSSAPI using Kerberos @@ -178,7 +178,7 @@ effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000; max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart) max_parallel_maintenance_workers = {{ postgresql_max_parallel_maintenance_workers }} # taken from max_parallel_workers max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers -parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} +parallel_leader_participation = {{ 'on' if postgresql_parallel_leader_participation else 'off' }} max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that # can be used in parallel operations old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate @@ -403,7 +403,7 @@ geqo_seed = {{ postgresql_geqo_seed }} # range 0.0-1.0 default_statistics_target = {{ postgresql_default_statistics_target }} # range 1-10000 constraint_exclusion = {{ postgresql_constraint_exclusion }} # on, off, or partition cursor_tuple_fraction = {{ postgresql_cursor_tuple_fraction }} # range 0.0-1.0 -from_collapse_limit = {{ postgresql_from_collapse_limit }} +from_collapse_limit = {{ postgresql_from_collapse_limit }} join_collapse_limit = {{ postgresql_join_collapse_limit }} # 1 disables collapsing of explicit # JOIN clauses force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode | bool == true or postgresql_force_parallel_mode == 'on' ) else ( 'regress' if postgresql_force_parallel_mode == 'regress' else 'off' ) }}