* debian/config.yml.in: Update configuration:

- Set use_pg_rewind, use_slots and check_timeline to true.
    - Update comments and formatting.
This commit is contained in:
Michael Banck 2022-02-18 22:15:57 +01:00
parent 9c3fa0ce30
commit 9f5c5c6af1
2 changed files with 30 additions and 17 deletions

3
debian/changelog vendored
View file

@ -6,6 +6,9 @@ patroni (2.1.3-1) UNRELEASED; urgency=medium
* debian/patches/regression_tests_disable_requirement_download.patch:
Removed, no longer needed.
* debian/patches/regression_tests_psutil_compat.patch: Likewise.
* debian/config.yml.in: Update configuration:
- Set use_pg_rewind, use_slots and check_timeline to true.
- Update comments and formatting.
-- Debian PostgreSQL Maintainers <team+postgresql@tracker.debian.org> Tue, 15 Feb 2022 23:06:34 +0100

44
debian/config.yml.in vendored
View file

@ -26,13 +26,15 @@ bootstrap:
pg_createcluster:
command: /usr/share/patroni/pg_createcluster_patroni
# this section will be written into Etcd:/<namespace>/<scope>/config after initializing new cluster
# and all other cluster members will use it as a `global configuration`
# This section will be written into /<namespace>/<scope>/config after
# initializing a new cluster and all other cluster members will use it as a
# `global configuration`
dcs:
ttl: 30
loop_wait: 10
retry_timeout: 10
maximum_lag_on_failover: 1048576
check_timeline: true
# master_start_timeout: 300
# synchronous_mode: false
# standby_cluster:
@ -40,10 +42,10 @@ bootstrap:
# port: 1111
# primary_slot_name: patroni
postgresql:
use_pg_rewind: false
use_pg_rewind: true
remove_data_directory_on_rewind_failure: true
remove_data_directory_on_diverged_timelines: true
# use_slots: true
use_slots: true
# The following parameters are given as command line options
# overriding the settings in postgresql.conf.
parameters:
@ -69,10 +71,16 @@ bootstrap:
- host replication all 127.0.0.1/32 md5
- host replication all ::1/128 md5
- host replication all @NETWORK@ md5
# # Some possibly desired options for 'initdb'
# initdb: # Note: It needs to be a list (some options need values, others are switches)
# # Some possibly desired options for 'initdb'. Note: It needs to be a list
# # (some options need values, others are # switches)
# initdb:
# - encoding: UTF8
# - data-checksums
# # Additional script to be launched after initial cluster creation (will be
# # passed the connection URL as parameter)
# post_init: /usr/local/bin/setup_cluster.sh
# # Additional users to be created after initializing the cluster
# users:
# foo:
@ -93,10 +101,11 @@ postgresql:
# Listen to all interfaces by default, this makes vip-manager work
# out-of-the-box without having to set net.ipv4.ip_nonlocal_bind or similar.
# If you prefer to only listen on some interfaces, edit the below:
#listen: "@HOSTIP@@LISTEN_VIP@,127.0.0.1:@PORT@"
# listen: "@HOSTIP@@LISTEN_VIP@,127.0.0.1:@PORT@"
listen: "*:@PORT@"
connect_address: @HOSTIP@:@PORT@
use_unix_socket: true
# Default Debian/Ubuntu directory layout
data_dir: @DATADIR_BASE@/@VERSION@/@CLUSTER@
bin_dir: /usr/lib/postgresql/@VERSION@/bin
config_dir: /etc/postgresql/@VERSION@/@CLUSTER@
@ -105,19 +114,20 @@ postgresql:
replication:
username: "replicator"
password: "rep-pass"
# A superuser role is required in order for Patroni to manage the local
# Postgres instance. If the option `use_unix_socket' is set to `true', then
# specifying an empty password results in no md5 password for the superuser
# being set and sockets being used for authentication. The `password:' line is
# nevertheless required. Note that pg_rewind will not work if no md5 password
# is set.
# A superuser role is required in order for Patroni to manage the local
# Postgres instance. If the option `use_unix_socket' is set to `true',
# then specifying an empty password results in no md5 password for the
# superuser being set and sockets being used for authentication. The
# `password:' line is nevertheless required. Note that pg_rewind will not
# work if no md5 password is set unless a rewind user is configured, see
# below.
superuser:
username: "postgres"
password:
# A rewind role can be specified in order for Patroni to use on PostgreSQL 11
# or later for pg_rewind, i.e. rewinding a former primary after failover
# without having to re-clone it. Patroni will assign this user the necessary
# permissions (that only exist from PostgreSQL)
# A rewind role can be specified in order for Patroni to use on PostgreSQL
# 11 or later for pg_rewind, i.e. rewinding a former primary after failover
# without having to re-clone it. Patroni will assign this user the
# necessary permissions (that only exist from PostgreSQL)
# rewind:
# username: "rewind"
# password: "rewind-pass"