Ian Barwick
26a9e848fd
Update copyright notices to 2018
2018-01-02 10:19:46 +09:00
Ian Barwick
edce8addbd
repmgr: add missing -W option to getopt_long() invocation
...
Addresses GitHub #350 .
2017-12-20 10:24:58 +09:00
Ian Barwick
8c121da8a1
Add diagnostic option "repmgr node check --has-passfile"
...
This checks if the active libpq version (9.6 and later) has the
"passfile" option, and returns 0 if present, 1 if not.
`
2017-12-11 20:09:48 +09:00
Ian Barwick
8208b3f844
witness (un)register: add --dry-run mode
2017-11-15 13:48:00 +09:00
Ian Barwick
ecb8297b1f
witness unregister: enable execution when witness server is down
...
Also add help output for "repmgr witness --help".
2017-11-15 13:47:54 +09:00
Ian Barwick
a6cc4d80f0
Add "witness register" functionality
2017-11-15 13:47:45 +09:00
Ian Barwick
7fffe3ed96
witness: initial code framework
2017-11-15 13:47:41 +09:00
Ian Barwick
02b6d3748b
Docs: update "repmgr cluster show"
2017-10-24 13:48:38 +09:00
Ian Barwick
7c3abe28b9
Standardize terminology on "primary" (in place of "master")
2017-10-24 13:42:50 +09:00
Ian Barwick
a39b8ccc2d
--dry-run available for "node rejoin"
2017-10-23 10:40:21 +09:00
Ian Barwick
37bdad290c
Add --help output for "repmgr node service"
...
Addresses GitHub #329 .
2017-10-20 16:44:44 +09:00
Ian Barwick
f565851de3
repmgr client: clean up command line option handling
2017-10-04 09:35:04 +09:00
Ian Barwick
d6c27f8938
Standardize quoting in log messages
2017-10-04 09:34:59 +09:00
Ian Barwick
9a6580a312
If problems found with configuration file, show which file was read
...
But only if it wasn't explicitly specified with -f/--config-file.
2017-10-04 09:34:46 +09:00
Ian Barwick
30b11c08e6
Disable any configuration settings not compatible with PostgreSQL 9.3
...
And emit a warning while we're at it.
2017-09-18 13:12:38 +09:00
Ian Barwick
ea2693bc75
Move create_recovery_file() et al to repmgr-action-standby.c
...
As they're only ever called from there.
2017-09-18 09:53:08 +09:00
Ian Barwick
b6b31b15b2
Implement "repmgr cluster cleanup"
2017-09-11 13:48:46 +09:00
Ian Barwick
a9f4a027a7
pgindent run
2017-09-11 11:14:13 +09:00
Ian Barwick
0e6699ecb6
Formatting updates before pgindent run
2017-09-11 11:05:43 +09:00
Ian Barwick
e4f7dc8234
Add copyright notices
2017-09-08 13:27:39 +09:00
Ian Barwick
ab8cb9d471
"standby register": remove database connection parameter warning
2017-09-07 17:09:29 +09:00
Ian Barwick
edee80cc37
Rename option "node check --is-shutdown" to "--is-shutdown-cleanly"
...
As that's what we really want to know. Also return "UNCLEAN_SHUTDOWN"
if that's the case, rather than "RUNNING" which is confusing, even
though it's a command for internal use.
2017-09-07 11:15:27 +09:00
Ian Barwick
03f400617c
"standby register": add --dry-run and check node is attached to upstream
2017-09-06 15:48:23 +09:00
Ian Barwick
eeef0b5df5
Trim recovery.conf lines when outputting as debug log lines
2017-09-05 10:33:41 +09:00
Ian Barwick
47a4b49890
Add "repmgr standby follow --upstream-node-id"
...
In an automatic failover situation, after a standby has been promoted
there's a risk the original primary may become available again before
"standby follow" is issued on another standby node, in which case "standby
follow" will reconnect to the original primary.
As the standby's repmgrd will have received a notification from the new
primary, it will know the primary's ID and can therefore explicitly
direct "standby follow" to follow that primary.
2017-09-04 09:11:59 +09:00
Ian Barwick
c7423ebb44
Various minor fixes
2017-08-31 23:54:52 +09:00
Ian Barwick
91941183bc
Use replication user, if set, when checking replication connections
2017-08-31 17:54:49 +09:00
Ian Barwick
04c9779561
Add documentation about passwords and recovery.conf
2017-08-31 15:24:09 +09:00
Ian Barwick
0e0b221507
Add configuration file setting "use_primary_conninfo_password"
...
If, for whatever reason, the upstream server password needs to be set
in "primary_conninfo", enable it to be extracted from $PGPASSWORD.
2017-08-31 14:57:07 +09:00
Ian Barwick
705b52fde4
Use actual program name rather than "repmgr" when executing remote commands
...
It's possible some distribution packages may assign a different name to the
"repmgr" binary (typically appending a version number), so we shouldn't hard-code
into the command string.
However it's reasonable to assume the "repmgr" binary will have the same name
across a replication cluster so we won't engage in any contortions to account
for possible variations.
See: https://github.com/2ndQuadrant/repmgr/issues/323
2017-08-31 11:04:11 +09:00
Ian Barwick
dfb796ca8f
Check config file *before* checking command line parameters
...
Validity of command line parameters may depened on settings in the configuration
file.
2017-08-31 09:55:32 +09:00
Ian Barwick
8b03859dbe
"standby clone": add early sanity check for external configuration files
...
This still requires an SSH connection, so we need to check early before
the cloning starts, and also emit useful information for --dry-run.
2017-08-29 22:11:16 +09:00
Ian Barwick
0b7dbb845c
Add warning for --dry-run when not effective
2017-08-28 15:10:57 +09:00
Ian Barwick
754084c814
Update "repmgr standby --help" output
2017-08-26 10:27:22 +09:00
Ian Barwick
5ee1eb6bf7
Convert --recovery-min-apply-delay to configuration file option
...
That way it only needs to be set once, and won't get lost during
follow operations etc.
2017-08-25 21:25:15 +09:00
Ian Barwick
4921f389b6
Fix spurious warning when executing "repmgr node rejoin"
...
Database connection parameters required for this.
2017-08-25 16:28:25 +09:00
Ian Barwick
ff07763242
repmgr: update --help output
...
Display database connection options.
2017-08-22 15:07:22 +09:00
Ian Barwick
7ca396b9cb
Add missing Barman options check
2017-08-21 14:10:08 +09:00
Ian Barwick
594e9e5007
Document upgrade process from repmgr3
...
Also provide unpackaged extension upgrade SQL, and a script to
assist converting repmgr.conf files.
2017-08-17 23:37:31 +09:00
Ian Barwick
da24d883e5
Remove option "--wal-keep-segments"
...
This is a remnant of the early repmgr days when there were no alternative
mechanisms for ensuring sufficient WAL remains available while cloning a
standby.
The purpose of this setting was to override a check for an (arbitrary)
minimum setting for "wal_keep_segments". As there's no reliable way
of determining a sensible value for this, and improvements in
pg_basebackup mean WALs can be streamed (possibly using a replication
slot) while the backup is in progress, there's no point in keeping
this around.
We will however still emit a warning about setting "wal_keep_segments"
if the configuration doesn't appear to provide any other way of
ensuring WAL is available during/after the cloning process and
"wal_keep_segments" is not set.
2017-08-17 14:45:13 +09:00
Ian Barwick
b1ba476241
Rename "archiver" check etc. to "archive-ready"
...
Gives a better indication of what's being checked.
2017-08-17 12:23:56 +09:00
Ian Barwick
b1b5870d54
"repmgr node status": add --help output, fix CSV output
...
Also ensure is executed only on local node, as it needs to read
the data directory.
2017-08-17 11:27:31 +09:00
Ian Barwick
0ac16f7630
Add more --help output
2017-08-16 17:49:46 +09:00
Ian Barwick
8ff545f9ae
Add --help output for "repmgr cluster"
2017-08-16 16:33:07 +09:00
Ian Barwick
4efc8fb9ce
Add placeholder functions for "repmgr $command --help"
...
There are now too many options to sensibly fit into general --help
output; we'll add separate output for each repmgr command, e.g.
"repmgr node --help".
2017-08-16 13:24:14 +09:00
Ian Barwick
4c0d719cdb
Add replication slot check to "repmgr node check"
2017-08-16 11:17:02 +09:00
Ian Barwick
554673e83e
Add "repmgr node check --downstream"
2017-08-15 15:50:46 +09:00
Ian Barwick
10ef30096c
"node check": add server role check
2017-08-14 22:57:09 +09:00
Ian Barwick
3b2158edbf
Initialise variables, where appropriate
2017-08-14 15:11:42 +09:00
Ian Barwick
4260fdf1e7
More code cleanup
2017-08-14 12:19:57 +09:00