Ian Barwick
9165d27f9f
"repmgr node ...": fixes for 9.3
...
Mainly to account for the lack of replication slots.
2017-11-16 11:25:16 +09:00
Ian Barwick
b8b991398a
Escape double-quotes in strings passed to an event notification script
...
The string in question will be generated internally by repmgr as a simple
one-line string with no control characters etc., so all that needs to be
escaped at the moment are any double quotes.
2017-11-16 10:36:48 +09:00
Ian Barwick
a9a17f206e
docs: improve documentation of pg_basebackup_options
2017-11-15 20:50:13 +09:00
Ian Barwick
9d432546bf
repmgrd: don't fail over unless more than 50% of active nodes are visible.
2017-11-15 13:48:28 +09:00
Ian Barwick
3c557ebd8e
repmgrd: finalize witness failover handling
2017-11-15 13:48:25 +09:00
Ian Barwick
4efeb52cba
repmgrd: synchronise repmgr.nodes table on witness server
2017-11-15 13:48:21 +09:00
Ian Barwick
60422c66f9
repmgrd: handle witness server
2017-11-15 13:48:17 +09:00
Ian Barwick
b63872afbb
"witness register": set upstream_node_id to that of the primary
2017-11-15 13:48:14 +09:00
Ian Barwick
a31980b590
repmgrd: basic witness node monitoring
2017-11-15 13:48:11 +09:00
Ian Barwick
e07a3c7976
docs: add witness command reference files to file list
2017-11-15 13:48:06 +09:00
Ian Barwick
9d9a1be062
docs: add command reference for "witness (un)register"
2017-11-15 13:48:03 +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
1553596f84
repmgr: minor fix to "repmgr standby --help" output
2017-11-15 13:47:52 +09:00
Ian Barwick
022d9c58c2
Add "witness unregister" functionality
2017-11-15 13:47:48 +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
9b93a595f5
docs: add some more index entries
2017-11-14 20:55:37 +09:00
Ian Barwick
c34e08b802
docs: document "passfile" configuration file parameter
2017-11-14 20:53:26 +09:00
Ian Barwick
eb14bb58c6
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-14 19:30:25 +09:00
Ian Barwick
aa28069d8b
docs: update release notes
...
Add note about changes to password handling.1
2017-11-14 18:47:39 +09:00
Ian Barwick
a1e272f64c
Update extension SQL
2017-11-13 10:02:46 +09:00
Ian Barwick
9908a9c662
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-10 17:19:30 +09:00
Ian Barwick
aa089820ab
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-10 14:35:17 +09:00
Ian Barwick
0230bafae1
repmgrd: updates related to node_id handling
2017-11-10 12:07:31 +09:00
Ian Barwick
de577adc67
repmgrd: catch corner cases where monitoring data is not available
2017-11-09 22:27:09 +09:00
Ian Barwick
fed17d49e3
repmgrd: ensure shmem is reinitialised after a restart
2017-11-09 19:31:21 +09:00
Ian Barwick
d80763f974
repmgrd: misc fixes
2017-11-09 19:31:16 +09:00
Ian Barwick
331e982bdb
repmgrd: fix priority/node_id tie-break check
2017-11-09 19:31:12 +09:00
Ian Barwick
4ca7e6a6bf
repmgrd: remove unneeded functions
2017-11-09 19:31:08 +09:00
Ian Barwick
6ac6e0733a
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:31:04 +09:00
Ian Barwick
79d21b516b
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-08 14:28:08 +09:00
Ian Barwick
7232187f4d
Ensure shared memory functions handle NULL parameters correctly
2017-11-08 12:19:07 +09:00
Ian Barwick
fe98270b3f
Update .gitignore
...
Ignore output from "make installcheck"
2017-11-08 12:09:33 +09:00
Ian Barwick
5a3e20fc38
README: update links to https versions
2017-11-08 12:07:35 +09:00
Ian Barwick
4ef2b111da
Fix lock acquisition in shared memory functions
2017-11-08 11:55:08 +09:00
Ian Barwick
97471626b4
Update repmgr.conf.sample
2017-11-02 17:43:03 +09:00
Ian Barwick
4bd236b64c
docs: fix example in BDR section
2017-11-02 11:23:41 +09:00
Ian Barwick
615dd2ecf4
docs: tweak Markdown URL formatting
2017-11-01 10:58:23 +09:00
Ian Barwick
1c1887f9cc
docs: update links to repmgr 4.0 documentation
2017-11-01 10:50:22 +09:00
Ian Barwick
d3f11a640d
docs: update copyright info
2017-11-01 09:35:57 +09:00
Ian Barwick
2341da7a06
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:27:13 +09:00
Ian Barwick
2c468d64fb
"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:14 +09:00
Ian Barwick
9d9b74d740
docs: add sample output to "standby follow" and "standby promote"
2017-10-27 15:03:34 +09:00
Ian Barwick
a90d4419a6
docs: add note about building docs
2017-10-27 10:44:16 +09:00
Ian Barwick
68756c79f3
Fix typo
2017-10-27 09:50:48 +09:00
Ian Barwick
8ad081e7b5
docs: finalize conversion of existing BDR repmgr documentation
2017-10-26 18:52:35 +09:00
Ian Barwick
6b76704817
Initial conversion of existing BDR repmgr documentation
2017-10-26 16:29:40 +09:00
Ian Barwick
c03c509e73
docs: update configuration documentation
2017-10-26 16:11:17 +09:00
Ian Barwick
d9db4f6c45
repmgr node rejoin: add --dry-run option
2017-10-25 11:01:58 +09:00