Commit Graph

41 Commits

Author SHA1 Message Date
Ian Barwick
617dee6bd6 Add function create_event_record()
For logging an event to the event table without generating an external
event notification.

Rename existing create_event_record*() functions to create_event_notification*()
as this describes their function better.
2017-07-05 09:52:22 +09:00
Ian Barwick
24c6b2c9f1 repmgrd: initial code for cascaded standby failover 2017-07-04 23:14:05 +09:00
Ian Barwick
618a2346e1 repmgrd: various fixed, mainly clearing status after a failover event 2017-07-04 11:55:03 +09:00
Ian Barwick
debe5a18c5 have new primary communicate to standbys 2017-06-30 21:45:25 +09:00
Ian Barwick
fc4f276844 Improve handling
not sure if we need to store the electoral term...
2017-06-30 13:40:19 +09:00
Ian Barwick
3514e20367 poke it around until it works less badly 2017-06-29 09:35:09 +09:00
Ian Barwick
fa86fe4ad8 Basic voting 2017-06-29 01:11:21 +09:00
Ian Barwick
d6b6255144 interim commit 2017-06-28 18:20:03 +09:00
Ian Barwick
ded8d95e5a interim commit 2017-06-28 16:38:41 +09:00
Ian Barwick
35b6178e07 placeholder code for function 2017-06-27 09:50:47 +09:00
Ian Barwick
78a16d746d Initial primary node monitoring 2017-06-27 00:15:29 +09:00
Ian Barwick
46c956e61a Use "primary" instead of "master" 2017-06-23 21:33:54 +09:00
Ian Barwick
1b2652037d Rename enum types for consistency 2017-06-23 16:38:14 +09:00
Ian Barwick
dbaa2e0b44 Add a RecordStatus return type for functions which populate record structures
Unify a bunch of slightly different ways of handling the result.
2017-06-23 16:16:46 +09:00
Ian Barwick
6cdf73b4cb repmgr standby promote: suppress master database connection error message
Otherwise the first line of output is an ERROR, which is confusing,
even though it's expected.
2017-06-21 13:21:44 +09:00
Ian Barwick
94a88326ef repmgrd: further code ported 2017-06-20 09:17:29 +09:00
Ian Barwick
030fdc046b repmgr standby follow: main code 2017-06-16 21:38:53 +09:00
Ian Barwick
36b3782009 Store the replication user in repmgr.nodes
When creating recovery.conf outside of "repmgr standby clone",
there was no way of knowing if a replication user had been
explicitly provided with --replication-user, meaning the value
of "primary_conninfo" would be set to the "conninfo" field of the
node's upstream node record.

We'll add an extra column to store the replication user for each
node so it can be referenced at any time.
2017-06-14 23:27:26 +09:00
Ian Barwick
e89c43c5cb Remove unused backup functions
Not needed since removal of rsync functionality
2017-06-13 00:35:01 +09:00
Ian Barwick
bb7d3e41c3 repmgr master unregister: check for downstream nodes
Foreign key dependencies will make it impossible to remove the node
if it still has downstream nodes pointing to it.
2017-06-12 22:24:50 +09:00
Ian Barwick
aa53514f9f repmgr: various fixes for "master unregister" 2017-06-12 08:18:10 +09:00
Ian Barwick
fef184ce9a Initial implementation of "repmgr master unregister"
Also adds "--dry-run" option
2017-06-12 08:17:58 +09:00
Ian Barwick
124398bed5 Replace is_standby() with get_recovery_type()
We what to know what kind of node it is, not whether it's a standby or not.
2017-06-09 11:25:43 +09:00
Ian Barwick
51da33a260 Initial implementation of "standby promote" 2017-05-10 09:24:51 +09:00
Ian Barwick
c7f49541a3 Add "standby unregister" 2017-05-08 23:37:53 +09:00
Ian Barwick
7844afa074 Implement "standby register" 2017-05-05 10:50:41 +09:00
Ian Barwick
06b79f2263 "standby clone": ensure replication user is used when conninfo str provided 2017-05-05 00:13:04 +09:00
Ian Barwick
10959d98bc "standby clone": honour -S/--superuser setting
Refactor superuser connection detection.
2017-05-02 17:58:57 +09:00
Ian Barwick
00fd8e81f8 "standby clone": basic port complete 2017-05-02 14:25:08 +09:00
Ian Barwick
a960ed9d49 "standby clone": perform clone operations 2017-05-02 09:58:17 +09:00
Ian Barwick
8f74d1b946 "standby clone": create replication slot 2017-05-02 00:38:36 +09:00
Ian Barwick
bcb17dd71a More functionality for "standby clone" 2017-04-29 22:41:43 +09:00
Ian Barwick
dc347f1484 Additional "standby clone" code
We'll break up the unwieldy "do_standby_clone()" function into discrete
unit for easier maintenance.
2017-04-28 22:00:26 +09:00
Ian Barwick
cd0509194d Validate --node-id/--node-name, if provided and acceptable
Also update --help output.
2017-04-26 21:18:28 +09:00
Ian Barwick
ef5c6b37a4 Add event logging 2017-04-24 23:20:23 +09:00
Ian Barwick
8a04879953 Parameterize record creation/update queries
Also merge the main functionality into a common function to avoid
duplication.
2017-04-24 22:21:38 +09:00
Ian Barwick
ca6b493763 create and update node records 2017-04-24 10:24:44 +09:00
Ian Barwick
18c2cfda0b Fix tabulation 2017-04-22 09:06:42 +09:00
Ian Barwick
a16bbbf107 master register: check for existing master presence/active record 2017-04-21 19:47:31 +09:00
Ian Barwick
77870d3887 master register: create repmgr extension 2017-04-21 18:38:28 +09:00
Ian Barwick
001d887e8d Initial database functions 2017-04-21 15:12:33 +09:00