From af4ef553e673e4946f6f52629cf8bfbf3d6af000 Mon Sep 17 00:00:00 2001 From: Greg Clough Date: Wed, 27 Mar 2024 13:06:27 +0000 Subject: [PATCH] style: add spaces around variables --- tasks/configure.yml | 16 +- tasks/databases.yml | 52 +-- tasks/extensions/contrib.yml | 2 +- tasks/extensions/postgis.yml | 2 +- tasks/install_apt.yml | 18 +- tasks/users.yml | 10 +- tasks/users_privileges.yml | 18 +- templates/etc_monit_conf.d_postgresql.j2 | 2 +- templates/pg_hba.conf.j2 | 14 +- templates/postgresql.conf-10.j2 | 458 +++++++++++------------ vars/RedHat.yml | 2 +- vars/RedHat_8.yml | 2 +- vars/RedHat_9.yml | 2 +- vars/bionic.yml | 4 +- vars/focal.yml | 4 +- vars/jammy.yml | 4 +- vars/xenial.yml | 4 +- 17 files changed, 307 insertions(+), 307 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index 390dff7a4..2c22c4905 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -9,7 +9,7 @@ - name: PostgreSQL | Make sure the postgres data directory exists file: - path: "{{postgresql_data_directory}}" + path: "{{ postgresql_data_directory }}" owner: "{{ postgresql_service_user }}" group: "{{ postgresql_service_group }}" state: directory @@ -138,7 +138,7 @@ - name: PostgreSQL | Update configuration - pt. 1 (pg_hba.conf) template: src: pg_hba.conf.j2 - dest: "{{postgresql_conf_directory}}/pg_hba.conf" + dest: "{{ postgresql_conf_directory }}/pg_hba.conf" owner: "{{ postgresql_service_user }}" group: "{{ postgresql_service_group }}" mode: 0640 @@ -149,7 +149,7 @@ template: src: "postgresql.conf-{{ postgresql_version }}.j2" # if using pgtune, save the template to ".untuned" - dest: "{{postgresql_conf_directory}}/postgresql.conf{% if postgresql_pgtune %}.untuned{% endif %}" + dest: "{{ postgresql_conf_directory }}/postgresql.conf{% if postgresql_pgtune %}.untuned{% endif %}" owner: "{{ postgresql_service_user }}" group: "{{ postgresql_service_group }}" mode: 0640 @@ -163,9 +163,9 @@ TMPDIR=$(mktemp -d) pgtune --input-config=postgresql.conf.untuned\ --output-config=$TMPDIR/postgresql.conf\ - {% if postgresql_pgtune_memory %}--memory {{postgresql_pgtune_memory|int}}{% endif %}\ - --type {{postgresql_pgtune_type|quote}}\ - {% if postgresql_pgtune_connections %}--connections {{postgresql_pgtune_connections|int}}{% endif %}\ + {% if postgresql_pgtune_memory %}--memory {{ postgresql_pgtune_memory|int }}{% endif %}\ + --type {{ postgresql_pgtune_type|quote }}\ + {% if postgresql_pgtune_connections %}--connections {{ postgresql_pgtune_connections|int }}{% endif %}\ # Compare the current config with the one procuded by pgtune (ignoring comments/blanks) if diff --ignore-blank-lines \ <(sed -e 's/#.*//' postgresql.conf) \ @@ -179,7 +179,7 @@ rm $TMPDIR/postgresql.conf rmdir $TMPDIR args: - chdir: "{{postgresql_conf_directory}}" + chdir: "{{ postgresql_conf_directory }}" executable: "/bin/bash" when: postgresql_pgtune register: postgresql_configuration_pt3 @@ -197,7 +197,7 @@ - name: PostgreSQL | Create folder for additional configuration files file: - name: "{{postgresql_conf_directory}}/conf.d" + name: "{{ postgresql_conf_directory }}/conf.d" state: directory owner: "{{ postgresql_service_user }}" group: "{{ postgresql_service_group }}" diff --git a/tasks/databases.yml b/tasks/databases.yml index 97cfb3adb..ddab96339 100644 --- a/tasks/databases.yml +++ b/tasks/databases.yml @@ -7,18 +7,18 @@ - name: PostgreSQL | Make sure the PostgreSQL databases are present postgresql_db: - name: "{{item.name}}" + name: "{{ item.name }}" owner: "{{ item.owner | default(postgresql_database_owner) }}" encoding: "{{ item.encoding | default(postgresql_encoding) }}" lc_collate: "{{ item.lc_collate | default(postgresql_locale) }}" lc_ctype: "{{ item.lc_ctype | default(postgresql_ctype) }}" - port: "{{postgresql_port}}" + port: "{{ postgresql_port }}" template: "template0" state: "{{ item.state | default('present') }}" - login_user: "{{postgresql_admin_user}}" + login_user: "{{ postgresql_admin_user }}" become: yes - become_user: "{{postgresql_admin_user}}" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_admin_user }}" + with_items: "{{ postgresql_databases }}" when: postgresql_databases|length > 0 - name: PostgreSQL | Add extensions to the databases @@ -36,9 +36,9 @@ - name: PostgreSQL | Add hstore to the databases with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" + with_items: "{{ postgresql_databases }}" register: hstore_ext_result failed_when: hstore_ext_result.rc != 0 and ("already exists, skipping" not in hstore_ext_result.stderr) changed_when: hstore_ext_result.rc == 0 and ("already exists, skipping" not in hstore_ext_result.stderr) @@ -46,9 +46,9 @@ - name: PostgreSQL | Add uuid-ossp to the database with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'" + with_items: "{{ postgresql_databases }}" register: uuid_ext_result failed_when: uuid_ext_result.rc != 0 and ("already exists, skipping" not in uuid_ext_result.stderr) changed_when: uuid_ext_result.rc == 0 and ("already exists, skipping" not in uuid_ext_result.stderr) @@ -56,37 +56,37 @@ - name: PostgreSQL | Add postgis to the databases with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS postgis;'&&psql {{item.name}} -c 'CREATE EXTENSION IF NOT EXISTS postgis_topology;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS postgis;'&&psql {{ item.name }} -c 'CREATE EXTENSION IF NOT EXISTS postgis_topology;'" + with_items: "{{ postgresql_databases }}" when: item.gis is defined and item.gis - name: PostgreSQL | add cube to the database with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'create extension if not exists cube;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'create extension if not exists cube;'" + with_items: "{{ postgresql_databases }}" when: item.cube is defined and item.cube - name: PostgreSQL | Add plpgsql to the database with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS plpgsql;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS plpgsql;'" + with_items: "{{ postgresql_databases }}" when: item.plpgsql is defined and item.plpgsql - name: PostgreSQL | add earthdistance to the database with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'create extension if not exists earthdistance;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'create extension if not exists earthdistance;'" + with_items: "{{ postgresql_databases }}" when: item.earthdistance is defined and item.earthdistance - name: PostgreSQL | Add citext to the database with the requirement become: yes - become_user: "{{postgresql_service_user}}" - shell: "{{ postgresql_bin_directory}}/psql {{item.name}} --port={{ postgresql_port | int }} --username {{postgresql_admin_user}} -c 'CREATE EXTENSION IF NOT EXISTS citext;'" - with_items: "{{postgresql_databases}}" + become_user: "{{ postgresql_service_user }}" + shell: "{{ postgresql_bin_directory }}/psql {{ item.name }} --port={{ postgresql_port | int }} --username {{ postgresql_admin_user }} -c 'CREATE EXTENSION IF NOT EXISTS citext;'" + with_items: "{{ postgresql_databases }}" register: citext_ext_result failed_when: citext_ext_result.rc != 0 and ("already exists, skipping" not in citext_ext_result.stderr) changed_when: citext_ext_result.rc == 0 and ("already exists, skipping" not in citext_ext_result.stderr) diff --git a/tasks/extensions/contrib.yml b/tasks/extensions/contrib.yml index c95b22abb..d4f83ee6e 100644 --- a/tasks/extensions/contrib.yml +++ b/tasks/extensions/contrib.yml @@ -20,7 +20,7 @@ - name: PostgreSQL | Extensions | Make sure the postgres contrib extensions are installed | Fedora dnf: - name: "postgresql{{postgresql_version_terse}}-contrib" + name: "postgresql{{ postgresql_version_terse }}-contrib" state: present when: ansible_pkg_mgr == "dnf" and ansible_distribution == "Fedora" notify: diff --git a/tasks/extensions/postgis.yml b/tasks/extensions/postgis.yml index 7eec8efc7..ad49b2c2f 100644 --- a/tasks/extensions/postgis.yml +++ b/tasks/extensions/postgis.yml @@ -10,7 +10,7 @@ name: "{{ postgresql_ext_postgis_deps }}" state: present update_cache: yes - cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" + cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}" when: ansible_os_family == "Debian" notify: - restart postgresql diff --git a/tasks/install_apt.yml b/tasks/install_apt.yml index 7ca888954..e5f5adab5 100644 --- a/tasks/install_apt.yml +++ b/tasks/install_apt.yml @@ -32,25 +32,25 @@ pkg: "{{ postgresql_apt_dependencies }}" state: present update_cache: yes - cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" + cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}" - name: PostgreSQL | Install PostgreSQL | apt apt: name: - - "postgresql-{{postgresql_version}}" - - "postgresql-client-{{postgresql_version}}" - - "postgresql-contrib-{{postgresql_version}}" + - "postgresql-{{ postgresql_version }}" + - "postgresql-client-{{ postgresql_version }}" + - "postgresql-contrib-{{ postgresql_version }}" state: present update_cache: yes - default_release: "{{postgresql_default_release | default(ansible_distribution_release + '-pgdg')}}" - cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" - environment: "{{postgresql_env}}" + default_release: "{{ postgresql_default_release | default(ansible_distribution_release + '-pgdg') }}" + cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}" + environment: "{{ postgresql_env }}" - name: PostgreSQL | PGTune | apt apt: name: pgtune state: present update_cache: yes - cache_valid_time: "{{apt_cache_valid_time | default (3600)}}" - environment: "{{postgresql_env}}" + cache_valid_time: "{{ apt_cache_valid_time | default (3600) }}" + environment: "{{ postgresql_env }}" when: postgresql_pgtune diff --git a/tasks/users.yml b/tasks/users.yml index cca86fd60..56e566702 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -7,14 +7,14 @@ - name: PostgreSQL | Make sure the PostgreSQL users are present postgresql_user: - name: "{{item.name}}" + name: "{{ item.name }}" password: "{{ item.pass | default(omit) }}" encrypted: "{{ item.encrypted | default(omit) }}" - port: "{{postgresql_port}}" + port: "{{ postgresql_port }}" state: "{{ item.state | default('present') }}" - login_user: "{{postgresql_admin_user}}" + login_user: "{{ postgresql_admin_user }}" no_log: "{{ postgresql_hide_passwords }}" become: yes - become_user: "{{postgresql_admin_user}}" - with_items: "{{postgresql_users}}" + become_user: "{{ postgresql_admin_user }}" + with_items: "{{ postgresql_users }}" when: postgresql_users|length > 0 diff --git a/tasks/users_privileges.yml b/tasks/users_privileges.yml index 94aaea245..38637b5c1 100644 --- a/tasks/users_privileges.yml +++ b/tasks/users_privileges.yml @@ -2,15 +2,15 @@ - name: PostgreSQL | Update the user privileges postgresql_user: - name: "{{item.name}}" - db: "{{item.db | default(omit)}}" - port: "{{postgresql_port}}" - priv: "{{item.priv | default(omit)}}" + name: "{{ item.name }}" + db: "{{ item.db | default(omit) }}" + port: "{{ postgresql_port }}" + priv: "{{ item.priv | default(omit) }}" state: present - login_host: "{{item.host | default(omit)}}" - login_user: "{{postgresql_admin_user}}" - role_attr_flags: "{{item.role_attr_flags | default(omit)}}" + login_host: "{{ item.host | default(omit) }}" + login_user: "{{ postgresql_admin_user }}" + role_attr_flags: "{{ item.role_attr_flags | default(omit) }}" become: yes - become_user: "{{postgresql_admin_user}}" - with_items: "{{postgresql_user_privileges}}" + become_user: "{{ postgresql_admin_user }}" + with_items: "{{ postgresql_user_privileges }}" when: postgresql_users|length > 0 diff --git a/templates/etc_monit_conf.d_postgresql.j2 b/templates/etc_monit_conf.d_postgresql.j2 index 30abdb462..a79a3057b 100644 --- a/templates/etc_monit_conf.d_postgresql.j2 +++ b/templates/etc_monit_conf.d_postgresql.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -check process postgresql with pidfile /var/run/postgresql/{{postgresql_version}}-{{postgresql_cluster_name}}.pid +check process postgresql with pidfile /var/run/postgresql/{{ postgresql_version }}-{{ postgresql_cluster_name }}.pid group database start program = "/etc/init.d/postgresql start" stop program = "/etc/init.d/postgresql stop" diff --git a/templates/pg_hba.conf.j2 b/templates/pg_hba.conf.j2 index 6a4f42aad..a2521979b 100644 --- a/templates/pg_hba.conf.j2 +++ b/templates/pg_hba.conf.j2 @@ -116,30 +116,30 @@ # Default: {% for connection in postgresql_pg_hba_default %} {% if connection.comment is defined %} -# {{connection.comment}} +# {{ connection.comment }} {% endif %} -{{connection.type}} {{connection.database}} {{connection.user}} {{connection.address}} {{connection.method}} +{{ connection.type }} {{ connection.database }} {{ connection.user }} {{ connection.address }} {{ connection.method }} {% endfor %} # MD5 hashed password hosts {% for host in postgresql_pg_hba_md5_hosts %} -host all all {{host}} md5 +host all all {{ host }} md5 {% endfor %} # Password hosts {% for host in postgresql_pg_hba_passwd_hosts %} -host all all {{host}} password +host all all {{ host }} password {% endfor %} # Trusted hosts {% for host in postgresql_pg_hba_trust_hosts %} -host all all {{host}} trust +host all all {{ host }} trust {% endfor %} # User custom {% for connection in postgresql_pg_hba_custom %} {% if connection.comment is defined %} -# {{connection.comment}} +# {{ connection.comment }} {% endif %} -{{connection.type}} {{connection.database}} {{connection.user}} {{connection.address}} {{connection.method}} +{{ connection.type }} {{ connection.database }} {{ connection.user }} {{ connection.address }} {{ connection.method }} {% endfor %} diff --git a/templates/postgresql.conf-10.j2 b/templates/postgresql.conf-10.j2 index 2016bbe81..d63245388 100644 --- a/templates/postgresql.conf-10.j2 +++ b/templates/postgresql.conf-10.j2 @@ -39,15 +39,15 @@ # 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 +data_directory = '{{ postgresql_data_directory }}' # use data in another directory # (change requires restart) -hba_file = '{{postgresql_hba_file}}' # host-based authentication file +hba_file = '{{ postgresql_hba_file }}' # host-based authentication file # (change requires restart) -ident_file = '{{postgresql_ident_file}}' # ident configuration file +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 +external_pid_file = '{{ postgresql_external_pid_file }}' # write an extra PID file # (change requires restart) @@ -57,52 +57,52 @@ external_pid_file = '{{postgresql_external_pid_file}}' # write an extra PID fi # - Connection Settings - -listen_addresses = '{{postgresql_listen_addresses|join(',')}}' # what IP address(es) to listen on; +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) -superuser_reserved_connections = {{postgresql_superuser_reserved_connections}} # (change requires restart) -unix_socket_directories = '{{postgresql_unix_socket_directories|join(',')}}' # comma-separated list of directories +port = {{ postgresql_port }} # (change requires restart) +max_connections = {{ postgresql_max_connections }} # (change requires restart) +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 +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 +bonjour = {{ 'on' if postgresql_bonjour else 'off' }} # advertise server via Bonjour # (change requires restart) -bonjour_name = '{{postgresql_bonjour_name}}' # defaults to the computer name +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 +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 = {{ 'on' if postgresql_ssl_prefer_server_ciphers else 'off' }} # (change requires restart) -ssl_ecdh_curve = '{{postgresql_ssl_ecdh_curve}}' # (change requires restart) -ssl_dh_params_file = '{{postgresql_ssl_dh_params_file}}' -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 -db_user_namespace = {{'on' if postgresql_db_user_namespace else 'off'}} -row_security = {{'on' if postgresql_row_security else 'off'}} +ssl_ecdh_curve = '{{ postgresql_ssl_ecdh_curve }}' # (change requires restart) +ssl_dh_params_file = '{{ postgresql_ssl_dh_params_file }}' +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 +db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }} +row_security = {{ 'on' if postgresql_row_security else 'off' }} # GSSAPI using Kerberos -krb_server_keyfile = '{{postgresql_krb_server_keyfile}}' -krb_caseins_users = {{'on' if postgresql_krb_caseins_users else 'off'}} +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; +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; +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; +tcp_keepalives_count = {{ postgresql_tcp_keepalives_count }} # TCP_KEEPCNT; # 0 selects the system default @@ -112,21 +112,21 @@ tcp_keepalives_count = {{postgresql_tcp_keepalives_count}} # TCP_KEEPCNT; # - Memory - -shared_buffers = {{postgresql_shared_buffers}} # min 128kB +shared_buffers = {{ postgresql_shared_buffers }} # min 128kB # (change requires restart) -huge_pages = {{postgresql_huge_pages}} # on, off, or try +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 +temp_buffers = {{ postgresql_temp_buffers }} # min 800kB +max_prepared_transactions = {{ postgresql_max_prepared_transactions }} # zero disables the feature # (change requires restart) # Caution: 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 -replacement_sort_tuples = {{postgresql_replacement_sort_tuples}} # limits use of replacement selection sort -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 +work_mem = {{ postgresql_work_mem }} # min 64kB +maintenance_work_mem = {{ postgresql_maintenance_work_mem }} # min 1MB +replacement_sort_tuples = {{ postgresql_replacement_sort_tuples }} # limits use of replacement selection sort +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 @@ -137,41 +137,41 @@ dynamic_shared_memory_type = {{postgresql_dynamic_shared_memory_type}} # the def # - Disk - -temp_file_limit = {{postgresql_temp_file_limit}} # limits per-process temp file space +temp_file_limit = {{ postgresql_temp_file_limit }} # limits per-process temp file space # in kB, or -1 for no limit # - Kernel Resource Usage - -max_files_per_process = {{postgresql_max_files_per_process}} # min 25 +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) +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 +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 multiplier on buffers scanned/round -bgwriter_flush_after = {{postgresql_bgwriter_flush_after}} # 0 disables, +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 multiplier on buffers scanned/round +bgwriter_flush_after = {{ postgresql_bgwriter_flush_after }} # 0 disables, # default is 512kB on linux, 0 otherwise # - Asynchronous Behavior - -effective_io_concurrency = {{postgresql_effective_io_concurrency}} # 1-1000; 0 disables prefetching -max_worker_processes = {{postgresql_max_worker_processes}} # (change requires restart) -max_parallel_workers_per_gather = {{postgresql_max_parallel_workers_per_gather}} # taken from max_parallel_workers -max_parallel_workers = {{postgresql_max_parallel_workers}} # maximum number of max_worker_processes that +effective_io_concurrency = {{ postgresql_effective_io_concurrency }} # 1-1000; 0 disables prefetching +max_worker_processes = {{ postgresql_max_worker_processes }} # (change requires restart) +max_parallel_workers_per_gather = {{ postgresql_max_parallel_workers_per_gather }} # taken from max_parallel_workers +max_parallel_workers = {{ postgresql_max_parallel_workers }} # maximum number of max_worker_processes that # can be used in parallel queries -old_snapshot_threshold = {{postgresql_old_snapshot_threshold}} # 1min-60d; -1 disables; 0 is immediate +old_snapshot_threshold = {{ postgresql_old_snapshot_threshold }} # 1min-60d; -1 disables; 0 is immediate # (change requires restart) -backend_flush_after = {{postgresql_backend_flush_after}} # 0 disables, default is 0 +backend_flush_after = {{ postgresql_backend_flush_after }} # 0 disables, default is 0 #------------------------------------------------------------------------------ @@ -180,51 +180,51 @@ backend_flush_after = {{postgresql_backend_flush_after}} # 0 disables, default # - Settings - -wal_level = {{postgresql_wal_level}} # minimal, replica, or logical +wal_level = {{ postgresql_wal_level }} # minimal, replica, or logical # (change requires restart) -fsync = {{'on' if postgresql_fsync else 'off'}} # flush data to disk for crash safety +fsync = {{ 'on' if postgresql_fsync else 'off' }} # flush data to disk for crash safety # (turning this off can cause # unrecoverable data corruption) -synchronous_commit = {{postgresql_synchronous_commit}} # synchronization level; +synchronous_commit = {{ postgresql_synchronous_commit }} # synchronization level; # off, local, remote_write, remote_apply, or on -wal_sync_method = {{postgresql_wal_sync_method}} # the default is the first option +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 +full_page_writes = {{ 'on' if postgresql_full_page_writes else 'off' }} # recover from partial page writes wal_compression = {{ 'on' if postgresql_wal_compression else 'off' }} wal_log_hints = {{ 'on' if postgresql_wal_log_hints else 'off' }} # 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 +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 -wal_writer_flush_after = {{postgresql_wal_writer_flush_after}} # 0 disables +wal_writer_delay = {{ postgresql_wal_writer_delay }} # 1-10000 milliseconds +wal_writer_flush_after = {{ postgresql_wal_writer_flush_after }} # 0 disables -commit_delay = {{postgresql_commit_delay}} # range 0-100000, in microseconds -commit_siblings = {{postgresql_commit_siblings}} # range 1-1000 +commit_delay = {{ postgresql_commit_delay }} # range 0-100000, in microseconds +commit_siblings = {{ postgresql_commit_siblings }} # range 1-1000 # - Checkpoints - -checkpoint_timeout = {{postgresql_checkpoint_timeout}} # range 30s-1d +checkpoint_timeout = {{ postgresql_checkpoint_timeout }} # range 30s-1d max_wal_size = {{ postgresql_max_wal_size if postgresql_max_wal_size or '1G' }} min_wal_size = {{ postgresql_min_wal_size if postgresql_min_wal_size or '80MB' }} -checkpoint_completion_target = {{postgresql_checkpoint_completion_target}} # checkpoint target duration, 0.0 - 1.0 -checkpoint_flush_after = {{postgresql_checkpoint_flush_after}} # measured in pages, 0 disables +checkpoint_completion_target = {{ postgresql_checkpoint_completion_target }} # checkpoint target duration, 0.0 - 1.0 +checkpoint_flush_after = {{ postgresql_checkpoint_flush_after }} # measured in pages, 0 disables # default is 256kB on linux, 0 otherwise -checkpoint_warning = {{postgresql_checkpoint_warning}} # 0 disables +checkpoint_warning = {{ postgresql_checkpoint_warning }} # 0 disables # - Archiving - archive_mode = {{ 'on' if ( postgresql_archive_mode|bool == true or postgresql_archive_mode == 'on' ) else ( 'always' if postgresql_archive_mode == 'always' else 'off' ) }} # enables archiving; off, on, or always # (change requires restart) -archive_command = '{{postgresql_archive_command}}' # command to use to archive a logfile segment +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 +archive_timeout = {{ postgresql_archive_timeout }} # force a logfile segment switch after this # number of seconds; 0 disables @@ -236,15 +236,15 @@ archive_timeout = {{postgresql_archive_timeout}} # force a logfile segment swit # 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 +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 +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 +max_replication_slots = {{ postgresql_max_replication_slots }} # max number of replication slots # (change requires restart) -track_commit_timestamp = {{'on' if postgresql_track_commit_timestamp else 'off' }} # collect timestamp of transaction commit +track_commit_timestamp = {{ 'on' if postgresql_track_commit_timestamp else 'off' }} # collect timestamp of transaction commit # (change requires restart) # - Master Server - @@ -255,25 +255,25 @@ synchronous_standby_names = '{% if postgresql_synchronous_standby_names != [] %} # method to choose sync standbys, number of sync standbys, # and 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 +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 +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 +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 +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 +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 +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 +wal_receiver_timeout = {{ postgresql_wal_receiver_timeout }} # time that receiver waits for # communication from master # in milliseconds; 0 disables @@ -281,12 +281,12 @@ wal_receiver_timeout = {{postgresql_wal_receiver_timeout}} # time that receiver # These settings are ignored on a publisher. -max_logical_replication_workers = {{postgresql_max_logical_replication_workers}} # taken from max_worker_processes +max_logical_replication_workers = {{ postgresql_max_logical_replication_workers }} # taken from max_worker_processes # (change requires restart) -max_sync_workers_per_subscription = {{postgresql_max_sync_workers_per_subscription}} # taken from max_logical_replication_workers +max_sync_workers_per_subscription = {{ postgresql_max_sync_workers_per_subscription }} # taken from max_logical_replication_workers -wal_retrieve_retry_interval = {{postgresql_wal_retrieve_retry_interval}} # time to wait before retrying to +wal_retrieve_retry_interval = {{ postgresql_wal_retrieve_retry_interval }} # time to wait before retrying to # retrieve WAL after a failed attempt #------------------------------------------------------------------------------ @@ -295,48 +295,48 @@ wal_retrieve_retry_interval = {{postgresql_wal_retrieve_retry_interval}} # time # - 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'}} +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 -parallel_tuple_cost = {{postgresql_parallel_tuple_cost}} # same scale as above -parallel_setup_cost = {{postgresql_parallel_setup_cost}} # same scale as above -min_parallel_table_scan_size = {{postgresql_min_parallel_table_scan_size}} -min_parallel_index_scan_size = {{postgresql_min_parallel_index_scan_size}} -effective_cache_size = {{postgresql_effective_cache_size}} +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 +parallel_tuple_cost = {{ postgresql_parallel_tuple_cost }} # same scale as above +parallel_setup_cost = {{ postgresql_parallel_setup_cost }} # same scale as above +min_parallel_table_scan_size = {{ postgresql_min_parallel_table_scan_size }} +min_parallel_index_scan_size = {{ postgresql_min_parallel_index_scan_size }} +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 +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 +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 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' ) }} @@ -347,25 +347,25 @@ force_parallel_mode = {{ 'on' if ( postgresql_force_parallel_mode|bool == true o # - Where to Log - -log_destination = '{{postgresql_log_destination}}' # Valid values are combinations of +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 +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, +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, +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, +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 +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 @@ -373,25 +373,25 @@ log_truncate_on_rotation = {{'on' if postgresql_log_truncate_on_rotation else 'o # 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 +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 +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}}' -syslog_sequence_numbers = {{'on' if postgresql_syslog_sequence_numbers else 'off'}} -syslog_split_messages = {{'on' if postgresql_syslog_split_messages else 'off'}} +syslog_facility = '{{ postgresql_syslog_facility }}' +syslog_ident = '{{ postgresql_syslog_ident }}' +syslog_sequence_numbers = {{ 'on' if postgresql_syslog_sequence_numbers else 'off' }} +syslog_split_messages = {{ 'on' if postgresql_syslog_split_messages else 'off' }} # This is only relevant when logging to eventlog (win32): # (change requires restart) -event_source = '{{postgresql_event_source}}' +event_source = '{{ postgresql_event_source }}' # - When to Log - -client_min_messages = {{postgresql_client_min_messages}} # values in order of decreasing detail: +client_min_messages = {{ postgresql_client_min_messages }} # values in order of decreasing detail: # debug5 # debug4 # debug3 @@ -402,7 +402,7 @@ client_min_messages = {{postgresql_client_min_messages}} # values in order of d # warning # error -log_min_messages = {{postgresql_log_min_messages}} # values in order of decreasing detail: +log_min_messages = {{ postgresql_log_min_messages }} # values in order of decreasing detail: # debug5 # debug4 # debug3 @@ -416,7 +416,7 @@ log_min_messages = {{postgresql_log_min_messages}} # values in order of decreas # fatal # panic -log_min_error_statement = {{postgresql_log_min_error_statement}} # values in order of decreasing detail: +log_min_error_statement = {{ postgresql_log_min_error_statement }} # values in order of decreasing detail: # debug5 # debug4 # debug3 @@ -430,7 +430,7 @@ log_min_error_statement = {{postgresql_log_min_error_statement}} # values in ord # fatal # panic (effectively off) -log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is disabled, 0 logs all statements +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 @@ -438,17 +438,17 @@ log_min_duration_statement = {{postgresql_log_min_duration_statement}} # -1 is d # - 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: +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 @@ -469,20 +469,20 @@ log_line_prefix = '{{postgresql_log_line_prefix}}' # special values: # 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_replication_commands = {{'on' if postgresql_log_replication_commands else 'off'}} -log_temp_files = {{postgresql_log_temp_files}} # log temporary files equal or larger +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_replication_commands = {{ 'on' if postgresql_log_replication_commands else 'off' }} +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}}' +log_timezone = '{{ postgresql_log_timezone }}' # - Process Title - -cluster_name = '{{postgresql_cluster_name}}' # added to process titles if nonempty +cluster_name = '{{ postgresql_cluster_name }}' # added to process titles if nonempty # (change requires restart) -update_process_title = {{'on' if postgresql_update_process_title else 'off'}} +update_process_title = {{ 'on' if postgresql_update_process_title else 'off' }} #------------------------------------------------------------------------------ @@ -491,50 +491,50 @@ update_process_title = {{'on' if postgresql_update_process_title else 'off'}} # - 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) -stats_temp_directory = '{{postgresql_stats_temp_directory}}' +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) +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'}} +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' +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 +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 +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 +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 +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 +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 +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_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_vacuum_cost_limit = {{ postgresql_autovacuum_vacuum_cost_limit }} # default vacuum cost limit for # autovacuum, -1 means use # vacuum_cost_limit @@ -545,78 +545,78 @@ autovacuum_vacuum_cost_limit = {{postgresql_autovacuum_vacuum_cost_limit}} # def # - 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 +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 -idle_in_transaction_session_timeout = {{postgresql_idle_in_transaction_session_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}}' -gin_fuzzy_search_limit = {{postgresql_gin_fuzzy_search_limit}} -gin_pending_list_limit = {{postgresql_gin_pending_list_limit}} +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 +idle_in_transaction_session_timeout = {{ postgresql_idle_in_transaction_session_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 }}' +gin_fuzzy_search_limit = {{ postgresql_gin_fuzzy_search_limit }} +gin_pending_list_limit = {{ postgresql_gin_pending_list_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 +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 +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 +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 +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 +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}}' +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(',')}}' +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 +deadlock_timeout = {{ postgresql_deadlock_timeout }} +max_locks_per_transaction = {{ postgresql_max_locks_per_transaction }} # min 10 # (change requires restart) -max_pred_locks_per_transaction = {{postgresql_max_pred_locks_per_transaction}} # min 10 +max_pred_locks_per_transaction = {{ postgresql_max_pred_locks_per_transaction }} # min 10 # (change requires restart) -max_pred_locks_per_relation = {{postgresql_max_pred_locks_per_relation}} # negative values mean +max_pred_locks_per_relation = {{ postgresql_max_pred_locks_per_relation }} # negative values mean # (max_pred_locks_per_transaction # / -max_pred_locks_per_relation) - 1 -max_pred_locks_per_page = {{postgresql_max_pred_locks_per_page}} # min 0 +max_pred_locks_per_page = {{ postgresql_max_pred_locks_per_page }} # min 0 #------------------------------------------------------------------------------ @@ -625,27 +625,27 @@ max_pred_locks_per_page = {{postgresql_max_pred_locks_per_page}} # mi # - 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'}} +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' }} operator_precedence_warning = {{ 'on' if postgresql_operator_precedence_warning else 'off' }} -quote_all_identifiers = {{'on' if postgresql_quote_all_identifiers else 'off'}} -standard_conforming_strings = {{'on' if postgresql_standard_conforming_strings else 'off'}} -synchronize_seqscans = {{'on' if postgresql_synchronize_seqscans else 'off'}} +quote_all_identifiers = {{ 'on' if postgresql_quote_all_identifiers 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'}} +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? +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? #------------------------------------------------------------------------------ diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 857791a2e..95d0d7969 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -9,7 +9,7 @@ postgresql_service_name: "postgresql-{{ postgresql_version }}" postgresql_varlib_directory_name: "pgsql" # Used to execute initdb -postgresql_bin_directory: "/usr/pgsql-{{postgresql_version}}/bin" +postgresql_bin_directory: "/usr/pgsql-{{ postgresql_version }}/bin" postgresql_unix_socket_directories: - "{{ postgresql_pid_directory }}" diff --git a/vars/RedHat_8.yml b/vars/RedHat_8.yml index 7e962d984..09934227e 100644 --- a/vars/RedHat_8.yml +++ b/vars/RedHat_8.yml @@ -9,7 +9,7 @@ postgresql_service_name: "postgresql-{{ postgresql_version }}" postgresql_varlib_directory_name: "pgsql" # Used to execute initdb -postgresql_bin_directory: "/usr/pgsql-{{postgresql_version}}/bin" +postgresql_bin_directory: "/usr/pgsql-{{ postgresql_version }}/bin" postgresql_unix_socket_directories: - "{{ postgresql_pid_directory }}" diff --git a/vars/RedHat_9.yml b/vars/RedHat_9.yml index 6555c04fb..6dddea528 100644 --- a/vars/RedHat_9.yml +++ b/vars/RedHat_9.yml @@ -9,7 +9,7 @@ postgresql_service_name: "postgresql-{{ postgresql_version }}" postgresql_varlib_directory_name: "pgsql" # Used to execute initdb -postgresql_bin_directory: "/usr/pgsql-{{postgresql_version}}/bin" +postgresql_bin_directory: "/usr/pgsql-{{ postgresql_version }}/bin" postgresql_unix_socket_directories: - "{{ postgresql_pid_directory }}" diff --git a/vars/bionic.yml b/vars/bionic.yml index a291ead62..e85d307de 100644 --- a/vars/bionic.yml +++ b/vars/bionic.yml @@ -3,8 +3,8 @@ postgresql_ext_postgis_deps: - libgeos-c1v5 - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}" - - "postgresql-{{postgresql_version}}-postgis-scripts" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}" + - "postgresql-{{ postgresql_version }}-postgis-scripts" postgresql_fdw_mysql_packages: "postgresql-{{ postgresql_version }}-mysql-fdw" postgresql_fdw_ogr_packages: "postgresql-{{ postgresql_version }}-ogr-fdw" diff --git a/vars/focal.yml b/vars/focal.yml index 61f2daa9f..f9913b374 100644 --- a/vars/focal.yml +++ b/vars/focal.yml @@ -3,8 +3,8 @@ postgresql_ext_postgis_deps: - libgeos-c1v5 - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}" - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}-scripts" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}-scripts" postgresql_fdw_mysql_packages: "postgresql-{{ postgresql_version }}-mysql-fdw" postgresql_fdw_ogr_packages: "postgresql-{{ postgresql_version }}-ogr-fdw" diff --git a/vars/jammy.yml b/vars/jammy.yml index 1bc49b2cc..a17d021a7 100644 --- a/vars/jammy.yml +++ b/vars/jammy.yml @@ -3,8 +3,8 @@ postgresql_ext_postgis_deps: - libgeos-c1v5 - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}" - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}-scripts" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}-scripts" postgresql_fdw_mysql_packages: "postgresql-{{ postgresql_version }}-mysql-fdw" postgresql_fdw_ogr_packages: "postgresql-{{ postgresql_version }}-ogr-fdw" diff --git a/vars/xenial.yml b/vars/xenial.yml index 9615b9905..7d814d2b0 100644 --- a/vars/xenial.yml +++ b/vars/xenial.yml @@ -3,8 +3,8 @@ postgresql_ext_postgis_deps: - libgeos-c1v5 - - "postgresql-{{postgresql_version}}-postgis-{{postgresql_ext_postgis_version}}" - - "postgresql-{{postgresql_version}}-postgis-scripts" + - "postgresql-{{ postgresql_version }}-postgis-{{ postgresql_ext_postgis_version }}" + - "postgresql-{{ postgresql_version }}-postgis-scripts" postgresql_fdw_mysql_packages: "postgresql-{{ postgresql_version }}-mysql-fdw" postgresql_fdw_ogr_packages: "postgresql-{{ postgresql_version }}-ogr-fdw"