Commit Graph

89 Commits

Author SHA1 Message Date
Ian Barwick 5d2efe8634 repmgr: improve logging of rsync actions
In particular, copy_remote_files() would report any kind of non-zero
exit status from rsync as an error, even though when cloning data
directories and tablespaces we explicitly ignore the "vanished
files" status (code 24) as it's expected behaviour for files in these
locations to disappear during the rsync copy process.
2017-03-01 14:26:39 +09:00
Ian Barwick 35b1208a57 repmgr: have "standby follow" delete old replication slot, if possible
Addresses GitHub #272
2017-02-16 16:13:06 +09:00
Ian Barwick 52efd6b54b repmgr: support --wal-method (replacing --xlog-method) for pg_basebackup in PostgreSQL 10 2017-02-15 22:39:59 +09:00
Ian Barwick 7324292f19 repmgrd: fix XLogRecPtr conversion function 2017-01-11 14:54:28 +09:00
Ian Barwick aaece9826e repmgrd: prevent invalid apply lag value being written to the monitoring table 2017-01-11 13:06:12 +09:00
Ian Barwick 82a41f1270 Update HISTORY 2016-12-27 14:49:35 +09:00
Ian Barwick 9da0914976 Consolidate various backported functions 2016-12-22 12:11:54 +09:00
Ian Barwick 062af91d36 Update HISTORY 2016-12-21 17:06:58 +09:00
Ian Barwick a21b16f960 Update HISTORY 2016-12-07 17:12:21 +09:00
Ian Barwick eb2cdf8a98 repmgr: improve handling of command line parameter errors
Previously providing a parameter which requires a value (e.g. -f/--config-file)
would result in a misleading error like "Unknown option -f".

Rather than suppress getopt's error messages, we'll rely on these to inform
about missing required values or unknown options (as other PostgreSQL tools
do), though we will still provide our own list of command line errors and
warnings countered above and beyond getopt's sanity checks.
2016-12-05 14:40:32 +09:00
Ian Barwick d6dbc70916 Update HISTORY 2016-11-25 08:17:01 +09:00
Ian Barwick b54f98ed8a repmgr: always log to STDERR even if log facility defined 2016-11-23 08:55:55 +09:00
Ian Barwick 6b02faf37c Update HISTORY 2016-10-24 09:04:04 +09:00
Ian Barwick f435abb3ec Update README
Also reorder HISTORY entries.
2016-10-10 15:10:06 +09:00
Ian Barwick 09ac6cd145 Update history 2016-10-05 13:57:10 +09:00
Ian Barwick ed22fe326e Document and expand pg_ctl override configuration options
These are now prefixed with "service_" to emphasize that they're
OS-level commands, not repmgr ones; also added reload and promote
commands:

    service_start_command
    service_stop_command
    service_restart_command
    service_reload_command
    service_promote_command

GitHub #169
2016-09-30 11:58:45 +09:00
Ian Barwick 46500e1408 Documentation update and miscellaneous code cleanup 2016-09-30 09:30:22 +09:00
Ian Barwick 77de5dbeeb Update HISTORY 2016-09-28 23:37:42 +09:00
Ian Barwick c4f84bd777 Update README
Document new `--copy-external-config-files` option.
2016-09-28 16:40:13 +09:00
Ian Barwick fa10fd8493 repmgr: add option --wait-sync for standby register
Causes repmgr to wait for the updated node record to propagate
to the standby before exiting. This can be used to ensure that
actions which depend on the standby's node record being synchronised
(such as starting repmgrd) are not carried out prematurely.

Addresses GitHub #103
2016-09-28 14:08:42 +09:00
Ian Barwick 5090b8cab1 Update HISTORY 2016-09-21 13:39:42 +09:00
Ian Barwick d244fb29d7 Update HISTORY 2016-08-15 13:15:55 +09:00
Ian Barwick e4c8bd981b Update HISTORY 2016-08-12 09:59:10 +09:00
Ian Barwick 45aa0724c4 Update HISTORY
Also remove code comment obsoleted by previous commit
2016-08-09 15:32:56 +09:00
Ian Barwick 00e55c0672 Update HISTORY 2016-08-09 12:29:19 +09:00
Ian Barwick 84ab37c600 Improve handling of failover events when failover is set to manual
- prevent repmgrd from repeatedly executing the failover code
- add event notification 'standby_disconnect_manual'
- update documentation

This addresses GitHub #221.
2016-08-09 12:09:09 +09:00
Ian Barwick cb78802027 repmgrd: prevent endless loops in failover with manual node
The LSN reported by the shared memory function defaults to "0/0"
(InvalidXLogRecPtr) - this indicates that the repmgrd on that node
hasn't been able to update it yet. However during failover several
places in the code assumed this is an error, which would cause
an endless loop waiting for updates which would never come.

To get around this without changing function definitions, we can
store an explicit message in the shared memory location field so the
caller can tell whether the other node hasn't yet updated the field,
or encountered situation which means it should not be considered
as a promotion candidate (which in most cases will be because
`failover` is set to `manual`.

Resolves GitHub #222.
2016-08-08 14:29:24 +09:00
Ian Barwick 73280a426b Update HISTORY 2016-08-05 16:43:52 +09:00
Ian Barwick d9bda915bb Update documentation and --help output for witness register
This completes the implementation of GitHub #186
2016-08-04 10:36:26 +09:00
Ian Barwick c42437a4f2 standby/witness unregister - enable even if node isn't running
If the `--node` option is provided with the id of the node to unregister,
the action can be executed on any node.

This addresses GitHub #211.
2016-08-02 17:09:27 +09:00
Ian Barwick d0c05e6f46 Clean up command line option handling and help output
- properly distinguish between the command line option -? and getopt's
  unknown option marker '?'
- remove deprecated command line options --initdb-no-pwprompt and
  -l/--local-port
- add witness command summary in help output
2016-08-02 14:40:13 +09:00
Ian Barwick e0a61afb7d Suppress connection error display in repmgr cluster show
This prevents connection error messages being mixed in
with `repmgr cluster show` output. Error message output can
still be enabled with the --verbose flag.

Fixes GitHub #215
2016-08-01 14:57:40 +09:00
Ian Barwick bbc88ce05c Miscellaneous code cleanup and typo fixes 2016-07-28 16:32:07 +09:00
Ian Barwick 5e03ef40cb Update HISTORY 2016-07-06 15:48:14 +09:00
Ian Barwick 4c463a66b7 Update HISTORY 2016-05-17 10:37:14 +09:00
Ian Barwick e100728b93 Update HISTORY 2016-04-12 15:51:42 +09:00
Ian Barwick d104f2a914 Update HISTORY 2016-04-12 15:51:42 +09:00
Ian Barwick 5a2a8d1c82 Update HISTORY 2016-04-12 15:51:41 +09:00
Ian Barwick 491ec37adf Update HISTORY 2016-03-31 14:58:50 +09:00
Ian Barwick c6e1bc205a Prevent repmgr/repmgrd running as root 2016-02-22 14:58:17 +09:00
Ian Barwick 827ffef5f9 Add '-P/--pwprompt' option for "repmgr create witness"
Optionally prompt for superuser and repmgr user when creating a witness.
This ensures a password can be provided if the primary's pg_hba.conf
mandates it.

This deprecates '--initdb-no-pwprompt'; and changes the default behaviour of
"repmgr create witness", which previously required a superuser password
unless '--initdb-no-pwprompt' was supplied.

This behaviour is more consistent with other PostgreSQL utilities such
as createuser.

Partial fix for GitHub issue #145.
2016-02-09 15:11:50 +09:00
Ian Barwick dfb34ae7b6 Update HISTORY 2016-01-28 11:44:28 +09:00
Ian Barwick efa60d142c Update HISTORY 2016-01-14 11:49:55 +09:00
Ian Barwick 79d1332f9c Update HISTORY 2016-01-05 13:54:17 +09:00
Ian Barwick 88a3378203 Update HISTORY 2015-11-30 16:56:34 +09:00
Ian Barwick 44acc8d719 Update HISTORY 2015-10-28 16:13:41 +09:00
Ian Barwick 2fd905cf9e Update HISTORY 2015-10-02 14:40:52 +09:00
Ian Barwick e1254b6773 Update HISTORY 2015-10-01 13:24:02 +09:00
Ian Barwick 1c9121c2d8 Witness server - extract explicit port setting from conninfo setting
This makes the '-l/--local-port' option redundant, which is now
marked as deprecated.
2015-10-01 09:42:44 +09:00
Ian Barwick 6cf5ab2e53 Update HISTORY 2015-09-30 12:48:10 +09:00