Commit Graph

160 Commits

Author SHA1 Message Date
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
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
aa5539ac5e Initial documentation for repmgr4 changes 2017-06-14 09:18:57 +09:00
Ian Barwick
dd06c82821 repmgr master register: support --dry-run 2017-06-14 09:18:38 +09:00
Ian Barwick
6af75a1151 repmgr standby: improve behaviour
- word hint about registering depending on whether record exists or not
- when checking for existing records with same name, check node id
  is different
2017-06-13 09:22:24 +09:00
Ian Barwick
042126dcff Update comments in "repmgr master ... " code 2017-06-13 09:22:05 +09:00
Ian Barwick
e89c43c5cb Remove unused backup functions
Not needed since removal of rsync functionality
2017-06-13 00:35:01 +09:00
Ian Barwick
f26f1c0428 Minor code tweaks 2017-06-13 00:31:01 +09:00
Ian Barwick
cc1f0a02cd Add missing call to PQconninfoFree() 2017-06-13 00:22:41 +09:00
Ian Barwick
bb7d3e41c3 repmgr master unregister: check for downstream nodes
Foreign key dependencies will make it impossible to remove the node
if it still has downstream nodes pointing to it.
2017-06-12 22:24:50 +09:00
Ian Barwick
fbb534e394 Add todo note 2017-06-12 21:27:09 +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
13e4913f1f Document events generated by functions 2017-06-12 08:18:10 +09:00
Ian Barwick
8720c9be45 repmgr master register: ensure event record is always written 2017-06-12 08:18:10 +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
ac9ccce3ef Basic functionality for 'repmgr master register' 2017-06-12 08:17:28 +09:00
Ian Barwick
124398bed5 Replace is_standby() with get_recovery_type()
We what to know what kind of node it is, not whether it's a standby or not.
2017-06-09 11:25:43 +09:00
Ian Barwick
056ed0328a Remove unused variable 2017-05-31 23:01:20 +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
4c5f065ef2 Check data directory not used by an active instance before cloning
This involves adding some infrastructure to parse pg_control in a
reasonably version-independent fashion. This will probably be useful
in other contexts where we need to verify the status of a
data directory where the instance isn't running.
2017-05-12 08:46:49 +09:00
Ian Barwick
d6b36e13d8 Strip trailing \n from various log messages 2017-05-12 08:44:44 +09:00
Ian Barwick
51da33a260 Initial implementation of "standby promote" 2017-05-10 09:24:51 +09:00
Ian Barwick
c61d16def6 Code cleanup in repmgr-action-standby.c 2017-05-09 23:11:24 +09:00
Ian Barwick
1aa6df95a9 Add initial code for remaining "repmgr standby" commands 2017-05-09 23:08:18 +09:00
Ian Barwick
0a8e9c2a32 "standby clone": fix return codes 2017-05-09 11:00:39 +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