Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repmgr extension improvement #3

Open
wants to merge 33 commits into
base: add-repmgr-extension
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8d355b9
allow setting state for postgresql_databases and postgresql_users
mchitten May 21, 2018
c52d15e
Update password_encryption for PostgreSQL 10
MiLk Jul 15, 2018
1d85e97
Merge branch 'master' into master
gclough Sep 10, 2019
2021b9f
Correct manage setting 'password_encryption' for PostgreSQL 10 and
MemberIT Dec 18, 2019
5ad154b
Update sync standby names to include choose keyword.
UmanShahzad Jan 10, 2020
d8fc0d3
Merge pull request #462 from UmanShahzad/patch-1
gclough Mar 6, 2020
bf79297
Merge branch 'master' of https://github.com/ANXS/postgresql into fix_…
MemberIT Mar 6, 2020
90a298c
local become not necessary
egmont1227 May 25, 2020
b4f7c06
Use the repmgr_config_directory for the location of the repmgr.conf n…
Jan 22, 2020
ce7a384
Use postgresql_port in the 'repmgr standby clone' for postgres instan…
Jan 22, 2020
1c4ea0c
Don't assume the first host in the play is the master, use the config…
Jan 22, 2020
7245880
Don't log .pgpass updates as they contain passwords
Jan 22, 2020
eef74a2
add debug print of repmgr_master
Jan 29, 2020
45e1ff7
Merge remote-tracking branch 'anxs/master' into add-repmgr-extension
egmont1227 May 28, 2020
4a62dc2
Disable check correct values of postgresql_password_encryption.
MemberIT Jun 10, 2020
bae39d7
README.md example fixed and added include-as-task example
europ Sep 30, 2020
0c15305
quoting
Nov 18, 2020
ffda21c
Merge pull request #360 from mchitten/master
gclough Feb 10, 2021
0eff79e
Merge pull request #368 from MiLk/encryption-pgsql10
gclough Feb 10, 2021
130ca73
Merge branch 'master' into fix_password_encryption
gclough Feb 10, 2021
99a2bbc
Merge pull request #460 from sportsru/fix_password_encryption
gclough Feb 10, 2021
c1d57d0
style: Standardising postgresql.conf style for passsword_encryption
gclough Feb 10, 2021
48fbb69
feat: Remove deprecated PostgreSQL versions < 9.5
gclough Feb 10, 2021
727453b
feat: Remove support for CentOS v6
gclough Feb 10, 2021
2afca73
Replace travis-ci.org with travis-ci.com
UnderGreen Feb 10, 2021
bd1b932
Depreacated Ubuntu 16.04, as it is EOL in 2 months (and is broken in …
gclough Feb 10, 2021
0b132c8
Merge pull request #503 from ANXS/sergei/patch_travis_name
gclough Feb 10, 2021
75bc255
Merge pull request #501 from gclough/remove_deprecation
gclough Feb 10, 2021
3f353bc
style: Standardising postgresql.conf style for passsword_encryption
gclough Feb 10, 2021
4c126b5
Merge branch 'quote_around_password_encryption' of https://github.com…
gclough Feb 10, 2021
fdadb50
Merge pull request #500 from gclough/quote_around_password_encryption
gclough Feb 11, 2021
0bbc9f8
Merge pull request #494 from europ/readme-fix
maglub Feb 23, 2021
f3b7f0d
Merge branch 'master' into add-repmgr-extension
egmont1227 Feb 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ 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"
- IMAGE_NAME="centos:6-builded"
## DISABLED ## - IMAGE_NAME="fedora:27-builded"
install:
- pip install ansible=="2.4.4.0" docker-py
Expand Down
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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!
Expand All @@ -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

Expand All @@ -34,16 +54,13 @@ 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 |
| ------------------------- |:---:|:---:|:--:|:--:|:--:|:--:|
| 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: |
| 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
Expand Down Expand Up @@ -83,6 +100,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

Expand All @@ -98,6 +116,7 @@ postgresql_users:
- name: baz
pass: pass
encrypted: yes # if password should be encrypted, postgresql >= 10 does only accepts encrypted passwords
state: "present" # optional; one of 'present', 'absent'

# List of schemas to be created (optional)
postgresql_database_schemas:
Expand Down
53 changes: 20 additions & 33 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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|

Expand Down Expand Up @@ -55,26 +58,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|
Expand Down Expand Up @@ -106,4 +93,4 @@ Vagrant.configure('2') do |config|
##
## end

end
end
5 changes: 2 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,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
Expand Down Expand Up @@ -282,7 +282,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,
Expand Down Expand Up @@ -374,7 +373,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.

Expand Down
11 changes: 6 additions & 5 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ galaxy_info:
versions:
- jessie
- stretch
- name: Ubuntu
versions:
- xenial
- bionic

- name: EL
versions:
- 6
- 7
#
# DISABLED
#
# - name: Ubuntu
# versions:
# - xenial
# - bionic
# - name: Fedora
# versions:
# - 27
Expand All @@ -35,9 +36,9 @@ galaxy_info:
- sql
- postgis
- debian
- ubuntu
- centos
- redhat
- fedora
- ubuntu

dependencies: []
2 changes: 1 addition & 1 deletion tasks/databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
Expand Down
16 changes: 9 additions & 7 deletions tasks/extensions/configure_repmgr.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 ''"
Expand Down Expand Up @@ -76,15 +77,15 @@
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
register: repmgr_cluster_show
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
Expand All @@ -96,7 +97,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 %} -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
Expand All @@ -111,15 +112,16 @@
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"
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 }}"

Expand All @@ -143,7 +145,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"
10 changes: 8 additions & 2 deletions tasks/extensions/detect_repmgr_primary.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -29,3 +29,9 @@
- debug:
var: repmgr_primary_check
verbosity: 1

- debug:
var: repmgr_master

- debug:
var: ansible_hostname
2 changes: 1 addition & 1 deletion tasks/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion templates/postgresql.conf-10.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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'}}

Expand Down
8 changes: 4 additions & 4 deletions templates/postgresql.conf-11.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {{ postgresql_password_encryption }} # md5 or scram-sha-256
db_user_namespace = {{ 'on' if postgresql_db_user_namespace else 'off' }}

# GSSAPI using Kerberos
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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' ) }}
Expand Down
Loading