-
Notifications
You must be signed in to change notification settings - Fork 0
/
slony_failover.conf
106 lines (88 loc) · 6.57 KB
/
slony_failover.conf
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
#------------------------------------------------------------------------------
# General behaviour
#------------------------------------------------------------------------------
lang = en # Language for script strings
# currently only en/fr
prefix_directory = /usr/failovers # Script working directory
separate_working_directory = true # Creates and appends a separate working
# directory to the prefix_directory
# for each script run
pid_filename = /var/run/slony_failover.pid # If the pid file name starts with a
# forward slash then taken as absoloute
# othewise appended to prefix_directory
slonik_path = /usr/local/pgsql/bin # Slonik binary if not in current path
enable_try_blocks = false # Group operations inside try blocks when
# doing a move set; only works with 'single'
# lockset_method
lockset_method = multiple # Used for MOVE SET
# multiple = lock all sets and move together
# single = lock and move each set at a time
pull_aliases_from_comments = false # Try to generate aliases in the
# slonik scripts based on comments within
# sl_set and comments in parentheses in sl_node
log_line_prefix = [%t PID=%p] # Special values:
# %p = process ID
# %t = timestamp without milliseconds
# %m = timestamp with milliseconds
failover_offline_subscriber_only = true # If set to true any subscriber only nodes
# that are unavailable at the time of failover
# will also be failed over. If false any such
# nodes will be excluded from the preamble and
# not failed over, however this may be problematic
# especially in the case where the most up to date
# node is the unavailable one.
drop_failed_nodes = true # Drop all failed nodes immediately
#------------------------------------------------------------------------------
# Database node to read initial Slony-I configuration from
#------------------------------------------------------------------------------
slony_database_host = localhost
slony_database_port = 5432
slony_database_name = TEST
slony_database_user = slony
slony_database_password = # Recommended to leave blank and use .pgpass
slony_cluster_name = test_replication
#------------------------------------------------------------------------------
# Logging and debugging
#------------------------------------------------------------------------------
enable_debugging = false
log_filename = failover-%Y-%m-%d.log # If the log file name starts with a
# forward slash then taken as absoloute
# othewise appended to prefix_directory
# Special values as per strftime spec
log_to_postgresql = false # Save log n a PostgreSQL table (table def in failover_log_database.sql)
log_database_host = localhost
log_database_port = 5432
log_database_name = TEST_FAILOVERS
log_database_user = failover_log_user
log_database_password = # Recommended to leave blank and use .pgpass
#------------------------------------------------------------------------------
# Autofailover
#------------------------------------------------------------------------------
enable_autofailover = false # Rather than interactive mode sit and
# watch the cluster state for failed
# origin/forwarding nodes; upon detection
# trigger automated failover.
autofailover_forwarding_providers = true # Also trigger failover on forwarding providers
autofailover_config_any_node = true # After reading the initial cluster configuration,
# subsequent reads of the configuration will
# use conninfo to read from any node.
autofailover_poll_interval = 50 # Cluster state poll interval (milliseconds)
autofailover_node_retry = 2 # Retries before initiating failover
autofailover_sleep_time = 5000 # Interval between retries (milliseconds)
autofailover_perspective_sleep_time = 20000 # Interval between lag reads for failed nodes
# from surviving nodes. If greater than zero
# any observation that nodes have failed is
# checked from surviving nodes perspective by
# checking if lag times are extending.
# This does not guarantee 100% the nodes are down
# but if set to a large enough interval (at least
# sync_interval_timeout) can back up our observation.
autofailover_majority_only = true # Only fail over if the quantity of surviving nodes
# is greater than the quantity of failed nodes.
# Intended to be used to prevent a split-brain scenario
# in conjunction with some other logic to monitor and
# fence off the old origin if it is in the minority.
autofailover_is_quorum = true # If this script is running on a separate host set to
# true to treat it as a quorum server. Effectively
# increments sum of surviving nodes when calculating
# the majority above.