Fix Patroni upgrade and D12 support

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:30 -04:00
parent 9411679004
commit b21778f117
1 changed files with 21 additions and 6 deletions

View File

@ -19,21 +19,25 @@ bootstrap:
postgresql: postgresql:
use_pg_rewind: true use_pg_rewind: true
parameters: parameters:
{% if debian_version|int >= 12 %}
wal_keep_size: 64
{% else %}
wal_keep_segments: 64 wal_keep_segments: 64
{% endif %}
max_wal_senders: 8 max_wal_senders: 8
max_replication_slots: 8 max_replication_slots: 8
initdb: initdb:
- encoding: UTF8 - encoding: UTF8
- data-checksums - data-checksums
pg_hba: pg_hba:
- local all all peer - local all all peer
- host replication replicator 127.0.0.1/32 trust - host replication replicator 127.0.0.1/32 trust
{% for node in pvc_nodes if node.is_coordinator %} {% for node in pvc_nodes if node.is_coordinator %}
- host replication replicator {{ node.cluster_ip }}/32 trust - host replication replicator {{ node.cluster_ip }}/32 trust
{% endfor %} {% endfor %}
- host all all 0.0.0.0/0 md5 - host all all 0.0.0.0/0 md5
users: users:
admin: admin:
@ -61,9 +65,20 @@ postgresql:
password: '{{ pvc_superuser_database_password }}' password: '{{ pvc_superuser_database_password }}'
parameters: parameters:
unix_socket_directories: '/run/postgresql' unix_socket_directories: '/run/postgresql'
{% if debian_version|int >= 12 %}
wal_keep_size: 64
{% else %}
wal_keep_segments: 64 wal_keep_segments: 64
{% endif %}
max_wal_senders: 8 max_wal_senders: 8
max_replication_slots: 8 max_replication_slots: 8
pg_hba:
- local all all peer
- host replication replicator 127.0.0.1/32 trust
{% for node in pvc_nodes if node.is_coordinator %}
- host replication replicator {{ node.cluster_ip }}/32 trust
{% endfor %}
- host all all 0.0.0.0/0 md5
tags: tags:
nofailover: false nofailover: false