Ian Barwick
5e9d50f8ca
repmgrd: finalize witness failover handling
2017-11-15 14:04:37 +09:00
Ian Barwick
347e753c27
repmgrd: synchronise repmgr.nodes table on witness server
2017-11-15 14:04:34 +09:00
Ian Barwick
2f978847b1
repmgrd: handle witness server
2017-11-15 14:04:30 +09:00
Ian Barwick
3014f72fda
"witness register": set upstream_node_id to that of the primary
2017-11-15 14:04:26 +09:00
Ian Barwick
e02ddd0f37
repmgrd: basic witness node monitoring
2017-11-15 14:04:23 +09:00
Ian Barwick
29fcee2209
docs: add witness command reference files to file list
2017-11-15 14:04:19 +09:00
Ian Barwick
f61f7f82eb
docs: add command reference for "witness (un)register"
2017-11-15 14:04:14 +09:00
Ian Barwick
efe28cbbeb
witness (un)register: add --dry-run mode
2017-11-15 14:04:09 +09:00
Ian Barwick
6131c1d8ce
witness unregister: enable execution when witness server is down
...
Also add help output for "repmgr witness --help".
2017-11-15 14:04:06 +09:00
Ian Barwick
c907b7b33d
repmgr: minor fix to "repmgr standby --help" output
2017-11-15 14:04:01 +09:00
Ian Barwick
e6644305d3
Add "witness unregister" functionality
2017-11-15 14:03:57 +09:00
Ian Barwick
31b856dd9f
Add "witness register" functionality
2017-11-15 14:03:54 +09:00
Ian Barwick
dff2bcc5de
witness: initial code framework
2017-11-15 14:03:50 +09:00
Ian Barwick
688e609169
docs: add some more index entries
2017-11-15 14:03:44 +09:00
Ian Barwick
3e68c9fcc6
docs: document "passfile" configuration file parameter
2017-11-15 14:03:40 +09:00
Ian Barwick
d459b92186
Add configuration file "passfile"
...
This will enable a custom .pgpass to be included in "primary_conninfo"
(provided it's supported by the libpq version on the standby).
2017-11-15 14:03:37 +09:00
Ian Barwick
2a898721c0
docs: update release notes
...
Add note about changes to password handling.1
2017-11-15 14:03:34 +09:00
Ian Barwick
35782d83c0
Update extension SQL
2017-11-15 14:03:30 +09:00
Ian Barwick
e16eb42693
repmgrd: detect role change from primary to standby
...
If repmgrd is monitoring a primary which is taken off-line, then later
restored as a standby, detect this change and resume monitoring
in standby node.
Addresses GitHub #338 .
2017-11-15 14:03:26 +09:00
Ian Barwick
4d6dc57589
repmgrd: check shared library is loaded
...
If this isn't the case, "repmgrd" will appear to run but not handle
failover correctly.
Address GitHub #337 .
2017-11-15 14:03:18 +09:00
Ian Barwick
cbc97d84ac
repmgrd: updates related to node_id handling
2017-11-15 14:03:15 +09:00
Ian Barwick
96fe7dd2d6
repmgrd: catch corner cases where monitoring data is not available
2017-11-15 14:03:12 +09:00
Ian Barwick
13935a88c9
repmgrd: ensure shmem is reinitialised after a restart
2017-11-09 19:51:31 +09:00
Ian Barwick
5275890467
repmgrd: misc fixes
2017-11-09 19:51:26 +09:00
Ian Barwick
7f865fdaf3
repmgrd: fix priority/node_id tie-break check
2017-11-09 19:51:22 +09:00
Ian Barwick
9e2fb7ea13
repmgrd: remove unneeded functions
2017-11-09 19:51:18 +09:00
Ian Barwick
a3428e4d8a
repmgrd: simplify the candidate selection logic
...
All disconnected nodes will be in a static, known state, so as long as
each node has the same meta-information (repmgr.nodes) and is able
to retrieve the last receive LSN of the other nodes, it is possible
for each node to independently determine the best promotion candidate,
thereby reaching consensus without an explicit "voting" process.
2017-11-09 19:51:13 +09:00
Ian Barwick
03b9475755
repmgrd: fixes to failover handling
...
get_new_primary() returns NULL if no notification for the new primary has
been received, but the code was expecting it to return UNKNOWN_NODE_ID,
which was causing repmgrd to prematurely drop out of the new primary
detection loop if no notification had been received by the time the loop
started.
Also store the electoral term as a single row, single column table,
to ensure that all repmgrds see the same turn. It is then bumped
by the winning node after it gets promoted.
Various logging improvements.
2017-11-09 19:51:09 +09:00
Ian Barwick
de1eb3c459
Ensure shared memory functions handle NULL parameters correctly
2017-11-09 19:51:02 +09:00
Ian Barwick
a13eccccc5
Update .gitignore
...
Ignore output from "make installcheck"
2017-11-09 19:50:57 +09:00
Ian Barwick
158f132bc0
README: update links to https versions
2017-11-09 19:50:53 +09:00
Ian Barwick
cdf54d217a
Fix lock acquisition in shared memory functions
2017-11-09 19:50:48 +09:00
Ian Barwick
1a8a82f207
Update repmgr.conf.sample
2017-11-09 19:50:42 +09:00
Ian Barwick
60e877ca39
docs: fix example in BDR section
2017-11-02 11:24:10 +09:00
Ian Barwick
91531bffe4
docs: tweak Markdown URL formatting
2017-11-01 10:59:10 +09:00
Ian Barwick
fc5f46ca5a
docs: update links to repmgr 4.0 documentation
2017-11-01 10:49:58 +09:00
Ian Barwick
b76952e136
docs: update copyright info
2017-11-01 09:36:16 +09:00
Ian Barwick
c3a1969f55
docs: convert command reference sections to <refentry> format
...
Note that most entries still need a bit more tidying up, consistent structuring,
provision of more examples etc.
2017-10-31 11:29:49 +09:00
Ian Barwick
11d856a1ec
"standby follow": get upstream record before server restart, if required
...
The standby may not always be available for connections right after it's
restarted, so attempting to connect and get the node's upstream record
after the restart may fail. Record is now retrieved before the restart.
Addresses GitHub #333 .
2017-10-27 16:30:25 +09:00
Ian Barwick
fbf357947d
docs: add sample output to "standby follow" and "standby promote"
2017-10-27 15:05:46 +09:00
Ian Barwick
47eaa99537
docs: add note about building docs
2017-10-27 10:46:58 +09:00
Ian Barwick
aeee11d1b7
docs: finalize conversion of existing BDR repmgr documentation
2017-10-26 18:57:34 +09:00
Ian Barwick
e4713c5eca
docs: update configuration documentation
2017-10-26 18:57:29 +09:00
Ian Barwick
e55e5a0581
Initial conversion of existing BDR repmgr documentation
2017-10-26 18:56:58 +09:00
Ian Barwick
fb0aae183d
Docs: update "repmgr cluster show"
2017-10-26 09:42:36 +09:00
Ian Barwick
52655e9cd5
Improve trim() function
...
Did not cope well with trailing spaces or entirely blank strings.
2017-10-26 09:42:26 +09:00
Ian Barwick
c5d91ca88c
repmgr node rejoin: add --dry-run option
2017-10-26 09:42:12 +09:00
Ian Barwick
9f5edd07ad
Fix typo
2017-10-26 09:35:25 +09:00
Ian Barwick
f58b102d51
Standardize terminology on "primary" (in place of "master")
2017-10-24 13:44:03 +09:00
Ian Barwick
90733aecf7
--dry-run available for "node rejoin"
2017-10-23 10:40:43 +09:00