Commit Graph

140 Commits

Author SHA1 Message Date
Ian Barwick
890b88d644 More failover fixes 2017-07-03 17:37:32 +09:00
Ian Barwick
1bc4e968f6 Localize variables 2017-07-03 14:57:39 +09:00
Ian Barwick
e3d52d1257 repmgrd: execute "standby follow" 2017-07-03 14:36:55 +09:00
Ian Barwick
18b40be7f1 Add configuration option "log_status_interval"
Normally (outside of log level DEBUG) repmgrd doesn't generate any
kind of log output, so examining the log file may give the impression
it's not working. Output an informational message at regular intervals
to show it's up and running.
2017-07-03 12:14:52 +09:00
Ian Barwick
34c746fcde Rename "logxxx" configuration file parameters to "log_xxx"
This is more consistent with other parameters and conforms to
the pattern used by PostgreSQL itself, which uses the prefix "log_"
for logging parameters.

A warning will be emitted if the old version of the parameter name
is detected.
2017-07-03 10:38:15 +09:00
Ian Barwick
debe5a18c5 have new primary communicate to standbys 2017-06-30 21:45:25 +09:00
Ian Barwick
1857e23fef add failover states 2017-06-30 17:42:39 +09:00
Ian Barwick
83405a6d39 Add sample configuration file
Formatted more like the default postgresql.conf file for clarity.
2017-06-30 17:14:06 +09:00
Ian Barwick
c793b1b7d2 repmgr: fix generation of default "dbname"
If not explicitly provided, "dbname" was being set early to the default
"username" value, which was leading to different behaviour to libpq
applications, where "dbname" defaults to "username" at connection
time.
2017-06-30 17:13:59 +09:00
Ian Barwick
a666a49977 Execute promote command 2017-06-30 16:04:47 +09:00
Ian Barwick
9caa715eb0 minor fixes 2017-06-30 14:30:41 +09:00
Ian Barwick
fc4f276844 Improve handling
not sure if we need to store the electoral term...
2017-06-30 13:40:19 +09:00
Ian Barwick
3514e20367 poke it around until it works less badly 2017-06-29 09:35:09 +09:00
Ian Barwick
fa86fe4ad8 Basic voting 2017-06-29 01:11:21 +09:00
Ian Barwick
d6b6255144 interim commit 2017-06-28 18:20:03 +09:00
Ian Barwick
f4e8bf891d interim commit 2017-06-28 17:28:26 +09:00
Ian Barwick
ded8d95e5a interim commit 2017-06-28 16:38:41 +09:00
Ian Barwick
35b6178e07 placeholder code for function 2017-06-27 09:50:47 +09:00
Ian Barwick
78a16d746d Initial primary node monitoring 2017-06-27 00:15:29 +09:00
Ian Barwick
7845a1fb47 Minimum supported version is currently 9.4 2017-06-25 21:46:50 +09:00
Ian Barwick
b64581c582 repmgrd: log startup on primary 2017-06-24 08:44:19 +09:00
Ian Barwick
27ad7b4f79 repmgrd: add stdout/stderr redirects 2017-06-23 22:41:58 +09:00
Ian Barwick
8117d4dcc4 Various minor fixes 2017-06-23 21:42:28 +09:00
Ian Barwick
46c956e61a Use "primary" instead of "master" 2017-06-23 21:33:54 +09:00
Ian Barwick
28808a02ab Fix return value of _get_node_record() 2017-06-23 20:44:40 +09:00
Ian Barwick
9566dc49f3 repmgrd: sanity check for presence of follow/promote commands
Autofailover will fail if either is missing.
2017-06-23 18:54:45 +09:00
Gianni Ciolli
71146aef9d Removing repmgr executable 2017-06-23 09:47:26 +01:00
Ian Barwick
1b2652037d Rename enum types for consistency 2017-06-23 16:38:14 +09:00
Ian Barwick
dbaa2e0b44 Add a RecordStatus return type for functions which populate record structures
Unify a bunch of slightly different ways of handling the result.
2017-06-23 16:16:46 +09:00
Ian Barwick
0823a83f92 Handle some deprecated command line options 2017-06-23 14:18:17 +09:00
Ian Barwick
3e3607167c Remove references to --data-dir 2017-06-23 14:13:32 +09:00
Ian Barwick
a5d15c22a8 repmgr standby follow: ensure data directory provided, if required
Required when using host parameters to reactivate a stopped node;
we have no other way of knowing the data directory.
2017-06-23 13:42:07 +09:00
Ian Barwick
ae67e086a4 repmgr master unregister: tighten behaviour 2017-06-23 11:37:42 +09:00
Ian Barwick
66535e5417 repmgrd: initial startup 2017-06-22 17:23:05 +09:00
Ian Barwick
9ce981c9f8 Documentation updates 2017-06-22 15:28:31 +09:00
Ian Barwick
0ffd33820c Update README 2017-06-22 13:37:05 +09:00
Ian Barwick
86e0f79135 repmgrd: fixes to command line handling 2017-06-22 13:22:46 +09:00
Ian Barwick
82c9b365ed Consolidate error/warning output code 2017-06-22 09:04:16 +09:00
Ian Barwick
d77736329a repmgrd: add command line option -L/--log-level
Mainly for ad-hoc debugging purposes without needing to change
the configuration file.
2017-06-22 00:09:18 +09:00
Ian Barwick
8d84732026 repmgr standby follow: suppress master database connection error messages 2017-06-21 14:53:02 +09:00
Ian Barwick
6cdf73b4cb repmgr standby promote: suppress master database connection error message
Otherwise the first line of output is an ERROR, which is confusing,
even though it's expected.
2017-06-21 13:21:44 +09:00
Ian Barwick
0c531e07e7 repmgr standby promote: add detail about an existing master 2017-06-21 10:25:12 +09:00
Ian Barwick
5ab2ac0e9a Convert configuration file parmeter "failover_mode" to an enum
We might want to add more modes in the future.
2017-06-21 09:53:41 +09:00
Ian Barwick
94a88326ef repmgrd: further code ported 2017-06-20 09:17:29 +09:00
Ian Barwick
f713f30ef8 repmgrd: basic code 2017-06-20 01:35:33 +09:00
Ian Barwick
6f77e84b62 Update handling of --replication-user 2017-06-16 22:10:07 +09:00
Ian Barwick
030fdc046b repmgr standby follow: main code 2017-06-16 21:38:53 +09:00
Ian Barwick
7b976ef2df repmgr standby follow: initial code 2017-06-16 00:05:18 +09:00
Ian Barwick
a69f80a9af standby clone: enable overwrite of existing data directory
But only if the --force is used, and the instance isn't active.
2017-06-15 22:43:49 +09:00
Ian Barwick
b440b5fcb8 Fix node record update query 2017-06-15 21:54:44 +09:00