forked from Demonware/postgresql
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy path002-repmgr.yml
More file actions
128 lines (113 loc) · 4.42 KB
/
Copy path002-repmgr.yml
File metadata and controls
128 lines (113 loc) · 4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
# Required configuration items
repmgr_target_group: ""
repmgr_user: repmgr
repmgr_password: repmgr
repmgr_database: repmgr
repmgr_conninfo: "host={{ ansible_hostname }} user={{ repmgr_user }} dbname={{ repmgr_database }} connect_timeout=2"
repmgr_data_directory: "{{ postgresql_data_directory }}"
# Loads the matching configuration file located in role's templates folder
repmgr_version: 5.3
# Optional configuration items
#
# Repositories
repmgr_apt_repository_add: true
repmgr_gpg_key_url: https://dl.2ndquadrant.com/gpg-key.asc
repmgr_apt_repository: "deb [arch=amd64] https://dl.2ndquadrant.com/default/release/apt {{ ansible_distribution_release }}-2ndquadrant main"
# Add the following variable in order to install a specific version from 2nd Quadrant repos using apt.
# repmgr_version_debian:
# Replication
repmgr_primary: false
repmgr_config_directory: "{{ postgresql_conf_directory }}"
repmgr_replication_user: "{{ repmgr_user }}"
repmgr_replication_type: physical
repmgr_location: default
repmgr_use_replication_slots: "no"
repmgr_witness_sync_interval: 15
repmgr_use_primary_conninfo_password: "false"
repmgr_passfile: /var/lib/postgresql/.pgpass
repmgr_base_key_path: /var/lib/postgresql/.ssh
repmgr_private_key_path: /var/lib/postgresql/.ssh/id_rsa
repmgr_public_key_path: /var/lib/postgresql/.ssh/id_rsa.pub
repmgr_ssh_key_bits: 2048
repmgr_ssh_key_type: rsa
repmgr_ssh_force_renewal: false
# Logging
repmgr_log_level: INFO
repmgr_log_facility: STDERR
repmgr_log_file: /var/lib/postgresql/repmgrd.log
repmgr_log_status_interval: 300
# Notification
repmgr_event_notification_command: ""
repmgr_event_notifications: ""
# Directories
repmgr_pg_bindir: "{{ postgresql_bin_directory }}"
repmgr_repmgr_bindir: "{{ postgresql_bin_directory }}"
# Commands & options
repmgr_pg_ctl_options: ""
repmgr_pg_basebackup_options: ""
repmgr_rsync_options: ""
repmgr_tablespace_mapping: ""
repmgr_restore_command: ""
repmgr_archive_cleanup_command: ""
repmgr_recovery_min_apply_delay: ""
repmgr_ssh_options: "-o StrictHostKeyChecking=no"
# Intervals & timeouts
repmgr_promote_check_timeout: 60
repmgr_promote_check_interval: 1
repmgr_primary_follow_timeout: 60
repmgr_standby_follow_timeout: 30
repmgr_standby_follow_restart: "false"
repmgr_shutdown_check_timeout: 60
repmgr_standby_reconnect_timeout: 60
repmgr_node_rejoin_timeout: 60
# Barman
repmgr_barman_host: ""
repmgr_barman_port: 22
repmgr_barman_user: barman
repmgr_barman_server: ""
repmgr_barman_config: ""
repmgr_repmgrd_pid_file: ""
# Fail-over
repmgr_failover: manual
repmgr_priority: 100
repmgr_connection_check_type: ping # Accepted: ping, connection, query
repmgr_reconnect_attempts: 6
repmgr_reconnect_interval: 10
repmgr_promote_command: ""
repmgr_follow_command: ""
repmgr_primary_notification_timeout: 60
repmgr_repmgrd_standby_startup_timeout: 60
repmgrd_exit_on_inactive_node: "false"
# Monitoring
repmgr_monitoring_history: "no"
repmgr_keep_history_days: 2 # used by the 'repmgr cluster cleanup' command which is to be executed by a cronjob. See configure_repmgr.yml
repmgr_monitor_interval_secs: 2
repmgr_degraded_monitoring_timeout: -1
repmgr_async_query_timeout: 60
# Advanced failover parameters (new in version 5.x)
repmgr_standby_disconnect_on_failover: "false"
repmgr_sibling_nodes_disconnect_timeout: 30
repmgr_primary_visibility_consensus: "false"
repmgr_always_promote: "false"
repmgr_failover_validation_command: ''
repmgr_election_rerun_interval: 15
repmgr_child_nodes_check_interval: 5
repmgr_child_nodes_connected_min_count: -1
repmgr_child_nodes_disconnect_min_count: -1
repmgr_child_nodes_disconnect_timeout: 30
repmgr_child_nodes_disconnect_command: ''
# Service commands
repmgr_service_start_command: pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} start
repmgr_service_stop_command: pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} stop
repmgr_service_restart_command: pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} restart
repmgr_service_reload_command: pg_ctlcluster {{ postgresql_version }} {{ postgresql_cluster_name }} reload
repmgr_service_promote_command: /usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl -w -D {{ postgresql_data_directory }} promote
# Warning levels
repmgr_archive_ready_warning: 16
repmgr_archive_ready_critical: 128
repmgr_replication_lag_warning: 300
repmgr_replication_lag_critical: 600
# repmgrd configuration
repmgrd_service_start_command: systemctl start repmgrd
repmgrd_service_stop_command: systemctl stop repmgrd