Commit Graph

78 Commits

Author SHA1 Message Date
Ian Barwick
8a2e4db1bc Add "repmgr node status"
Outputs an overview of a node's status, and emits warnings if any
issues detected.
2017-07-25 00:39:04 +09:00
Ian Barwick
b99443b0c8 Improvements to repmgr cluster show
Add documentation; show recovery status in --csv mode.
2017-07-20 10:25:13 +09:00
Ian Barwick
38730033d4 Miscellaneous code cleanup 2017-07-20 09:11:38 +09:00
Ian Barwick
076934558d Allow "CLUSTER EVENTS" as synonym for "CLUSTER EVENT" 2017-07-19 22:08:22 +09:00
Ian Barwick
49ac9cf9ca Add "repmgr cluster show" 2017-07-19 17:36:21 +09:00
Ian Barwick
248525ccba Remove unused PQexpBuffer
It was being referenced without being initialised, but the output
which would have been placed there is not used anyway, so discard
completely.
2017-07-18 12:06:26 +09:00
Ian Barwick
ec554e5694 Improve connection handling
Set "connect_timeout" and "fallback_application_name" if not present.
2017-07-17 11:10:37 +09:00
Ian Barwick
ec00202a31 Add configure option --with-bdr-only
Builds repmgr with only BDR functionality; other code is disabled
at critical points.
2017-07-16 17:18:34 +09:00
Ian Barwick
e3b3fb65f0 repmgrd: restrict BDR monitoring to two node setup
It's not safe to have more than two nodes with this kind of
"failover", so we don't need to select alternative nodes by
priority.
2017-07-14 12:56:11 +09:00
Ian Barwick
2594a46a4f Limit repmgr installation on a BDR cluster to two nodes 2017-07-13 14:10:08 +09:00
Ian Barwick
1cccb1dd5a Add "repmgr bdr unregister" 2017-07-12 10:11:21 +09:00
Ian Barwick
71a0871232 Add "repmgr bdr register" 2017-07-11 15:38:58 +09:00
Ian Barwick
5fbcf3e476 Remove witness server references 2017-07-10 09:31:31 +09:00
Ian Barwick
617dee6bd6 Add function create_event_record()
For logging an event to the event table without generating an external
event notification.

Rename existing create_event_record*() functions to create_event_notification*()
as this describes their function better.
2017-07-05 09:52:22 +09:00
Ian Barwick
9bf264177f Add checks for use of --upstream-node-id 2017-07-04 23:35:19 +09:00
Ian Barwick
4e06355b57 Replace repmgr.conf item "upstream_node_id" with --upstream-node-id
This is only relevant when cloning a standby and the node's upstream
can change after failover/switchover etc., so no point keeping the
original value around in the configuration file.
2017-07-04 23:34:20 +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
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
7845a1fb47 Minimum supported version is currently 9.4 2017-06-25 21:46:50 +09:00
Ian Barwick
46c956e61a Use "primary" instead of "master" 2017-06-23 21:33:54 +09:00
Ian Barwick
1b2652037d Rename enum types for consistency 2017-06-23 16:38:14 +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
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
0c531e07e7 repmgr standby promote: add detail about an existing master 2017-06-21 10:25:12 +09:00
Ian Barwick
6f77e84b62 Update handling of --replication-user 2017-06-16 22:10:07 +09:00
Ian Barwick
7b976ef2df repmgr standby follow: initial code 2017-06-16 00:05:18 +09:00
Ian Barwick
36b3782009 Store the replication user in repmgr.nodes
When creating recovery.conf outside of "repmgr standby clone",
there was no way of knowing if a replication user had been
explicitly provided with --replication-user, meaning the value
of "primary_conninfo" would be set to the "conninfo" field of the
node's upstream node record.

We'll add an extra column to store the replication user for each
node so it can be referenced at any time.
2017-06-14 23:27:26 +09:00
Ian Barwick
dd06c82821 repmgr master register: support --dry-run 2017-06-14 09:18:38 +09:00
Ian Barwick
bfa6f6709d repmgrd: add --help output and update Makefile 2017-06-12 09:11:32 +09:00
Ian Barwick
9a1cdade59 Update --help output 2017-06-12 08:39:50 +09:00
Ian Barwick
aa53514f9f repmgr: various fixes for "master unregister" 2017-06-12 08:18:10 +09:00
Ian Barwick
fef184ce9a Initial implementation of "repmgr master unregister"
Also adds "--dry-run" option
2017-06-12 08:17:58 +09:00
Ian Barwick
3a56bec4b5 repmgr: remove rsync cloning option 2017-05-31 22:59:35 +09:00
Ian Barwick
2d91413caf Various minor fixes and code comments 2017-05-30 09:34:04 +09:00
Ian Barwick
d6b36e13d8 Strip trailing \n from various log messages 2017-05-12 08:44:44 +09:00
Ian Barwick
1aa6df95a9 Add initial code for remaining "repmgr standby" commands 2017-05-09 23:08:18 +09:00
Ian Barwick
c7f49541a3 Add "standby unregister" 2017-05-08 23:37:53 +09:00
Ian Barwick
08d2da3443 Fix pointer usage 2017-05-08 15:29:52 +09:00
Ian Barwick
5e48a19ebe "standby clone": process -w/--wal-keep-segment 2017-05-05 21:03:16 +09:00
Ian Barwick
aaa9af2371 "standby clone": fix a couple of regressions 2017-05-05 20:08:14 +09:00
Ian Barwick
bb0aac8912 "standby clone": rsync mode does of course accept -c/--fast-checkpoint 2017-05-05 19:03:33 +09:00
Ian Barwick
22c2f01d87 Process hostname as separate argument 2017-05-05 18:48:39 +09:00
Ian Barwick
7844afa074 Implement "standby register" 2017-05-05 10:50:41 +09:00
Ian Barwick
c41ff2c442 Add some todos 2017-05-04 23:49:55 +09:00
Ian Barwick
bb362bdb7e Various improvements to database parameter handling
With "standby clone" also better indicate whether the repmgr extension
is actually available.
2017-05-04 23:15:28 +09:00
Ian Barwick
10959d98bc "standby clone": honour -S/--superuser setting
Refactor superuser connection detection.
2017-05-02 17:58:57 +09:00
Ian Barwick
00fd8e81f8 "standby clone": basic port complete 2017-05-02 14:25:08 +09:00
Ian Barwick
a960ed9d49 "standby clone": perform clone operations 2017-05-02 09:58:17 +09:00