Ian Barwick
518866eba5
"node status": improve replication slot warnings
...
Addresses GitHub #385
2018-02-23 11:06:47 +09:00
Ian Barwick
425839d764
Fix typo in function name
2018-02-22 15:48:41 +09:00
Ian Barwick
14420d83fa
"node rejoin": ensure --dry-run is honoured
...
Addresses GitHub #383 .
2018-02-20 15:28:39 +09:00
Ian Barwick
c9eb1bfcc0
Always initialise t_conninfo_param_list structures
2018-02-13 10:48:18 +09:00
Ian Barwick
eb7dca2919
"node status": add warning about missing replication slots
...
Implements GitHub #364 .
2018-02-12 10:53:31 +09:00
Ian Barwick
7b4ee80af2
"standby switchover": check demotion candidate can make replication connection
...
Check it's actually possible for the demotion candidate to attach to
the promotion candidate before executing the switchover.
As with other checks of this nature, there's a faint possibility the
situation could change between the time the check is carried out and
the demotion candidate is restarted to connect to the promotion candidate,
but there's not a lot we can do about that. The main purpose is to
be able to catch existing misconfigurations before anything gets changed.
Implements GitHub #370 .
2018-02-09 10:01:29 +09:00
Tony Finch
a481ca7ce2
"repmgr node status": correct upstream node info ( #363 )
...
repmgr was printing the name and ID of this node instead of its upstream
Signed-off-by: Tony Finch <dot@dotat.at >
2018-02-05 09:54:00 +09:00
Ian Barwick
2eec8b5d79
Have do_standby_follow_internal() not abort on error
...
Pass the error code back to the caller instead, mainly so
"repmgr node rejoin" can better report errors.
2018-01-30 16:53:04 +09:00
Ian Barwick
3d6437c8f8
repmgr: assume node is actually shutting down if pingable and that's the reported status
2018-01-16 11:17:06 +09:00
Ian Barwick
ae7963dc64
repmgr: automatically create slot name if missing
...
It's possible that a node was registered with "use_replication_slots=false"
but that was later changed to "use_replication_slots=true". If the node
was not subsequently re-registered, the node record will contain an empty
slot name, which will cause any slot creation operation during
"standby follow" or "node rejoin" to fail.
To prevent this happening, check for an empty slot name and automatically
set before proceeding.
Addresses GitHub #343 .
2018-01-11 11:13:41 +09:00
Ian Barwick
faffb2a6e7
repmgr: catch possible corner case when checking node shutdown status
...
It's conceivable that PQping is returning "no response" but the
shutdown hasn't quite completed.
2018-01-10 14:56:00 +09:00
Ian Barwick
3d2530d6f9
Fix query in is_active_bdr_node()
...
Boolean column was not being checked correctly.
Also add detail output in "repmgr node role --check", where the function
is called.
2018-01-04 10:48:31 +09:00
Ian Barwick
e517cc74d1
repmgr node rejoin: handle missing node record correctly
...
If a connection was provided for a database other than the "repmgr"
database, error was logged but execution continued, resulting in
the connection being finished twice.
Addresses GitHub #358 .
2018-01-03 15:20:10 +09:00
Ian Barwick
1521657965
Update copyright notices to 2018
2018-01-02 10:20:09 +09:00
Ian Barwick
54a10a0c3f
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-05 12:53:04 +09:00
Ian Barwick
c20475f94a
Delete any replication slots copied by pg_rewind
...
If --force-rewind is used in conjunction with "repmgr node rejoin",
any replication slots present on the source node will be copied too;
it's essential to remove these to prevent stale slots being extant
when the node starts up.
We do this at file system level *before* the server starts to minimize
the risk of any problems.
Addresses GitHub #334
2017-11-24 11:15:14 +09:00
Ian Barwick
f8a0b051c8
repmgr: fix return code output for repmgr node check --action=...
...
Addresses GitHub #340
2017-11-23 10:35:41 +09:00
Ian Barwick
3f872cde0c
"repmgr node ...": fixes for 9.3
...
Mainly to account for the lack of replication slots.
2017-11-16 11:26:39 +09:00
Ian Barwick
c5d91ca88c
repmgr node rejoin: add --dry-run option
2017-10-26 09:42:12 +09:00
Ian Barwick
a9759cf6ca
Add --help output for "repmgr node service"
...
Addresses GitHub #329 .
2017-10-20 16:49:29 +09:00
Ian Barwick
6852ac82c6
Add --help output for "repmgr node rejoin"
...
Addresses GitHub #329 .
2017-10-20 16:49:19 +09:00
Ian Barwick
5045e2eb9d
node rewind: add check for pg_rewind and --dry-run mode
...
Addresses GitHub #330
2017-10-20 14:16:56 +09:00
Ian Barwick
20224d1296
Prevent compiler truncation warnings
2017-09-19 16:24:01 +09:00
Ian Barwick
e64600d3e3
Prevent compiler truncation warnings
2017-09-19 16:15:47 +09:00
Ian Barwick
e3defc507e
Merge branch 'pg93'
2017-09-18 15:55:32 +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
68f4a37ca4
Update README
2017-09-14 08:57:16 +09:00
Ian Barwick
a9f4a027a7
pgindent run
2017-09-11 11:14:13 +09:00
Ian Barwick
64ec85bb10
Clarify _do_node_archive_config() usage
2017-09-11 11:00:13 +09:00
Ian Barwick
e4f7dc8234
Add copyright notices
2017-09-08 13:27:39 +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
5b5b456ecb
"standby switchover": improve logging
...
Also no need to disconnect/reconnect from/to local node while it promotes.
2017-09-05 10:26:27 +09:00
Ian Barwick
edb74ccef9
Various fixes to "repmgr node rejoin"
2017-09-01 11:30:31 +09:00
Ian Barwick
ac64526bd3
Finalize "repmgr node --help" output
2017-08-17 14:25:43 +09:00
Ian Barwick
9ac5c48cc5
Add --help output for "repmgr node check"
2017-08-17 14:12:40 +09:00
Ian Barwick
5127b9253b
"repmgr node check": improve Nagios output
2017-08-17 13:54:48 +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
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
3e9ce6fe38
Fix "repmgr node check --role" output
2017-08-15 22:07:07 +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
fa7d60cd51
"node check": initial general output
2017-08-14 17:32:44 +09:00
Ian Barwick
3b2158edbf
Initialise variables, where appropriate
2017-08-14 15:11:42 +09:00
Ian Barwick
eabd56f3be
"standby follow": check node system identifiers match
2017-08-14 11:45:08 +09:00
Ian Barwick
0f31756733
General code cleanup
2017-08-14 10:04:53 +09:00
Ian Barwick
50b82f785e
Add function to execute "IDENTIFY_SYSTEM"
2017-08-11 22:01:02 +09:00
Ian Barwick
f972aec198
Parse recovery.conf file
...
This will be useful for various kinds of diagnostics.
2017-08-10 23:58:16 +09:00