Commit Graph

50 Commits

Author SHA1 Message Date
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
dd06c82821 repmgr master register: support --dry-run 2017-06-14 09:18:38 +09:00
Ian Barwick
bfa6f6709d repmgrd: add --help output and update Makefile 2017-06-12 09:11:32 +09:00
Ian Barwick
9a1cdade59 Update --help output 2017-06-12 08:39: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
3a56bec4b5 repmgr: remove rsync cloning option 2017-05-31 22:59:35 +09:00
Ian Barwick
2d91413caf Various minor fixes and code comments 2017-05-30 09:34:04 +09:00
Ian Barwick
d6b36e13d8 Strip trailing \n from various log messages 2017-05-12 08:44:44 +09:00
Ian Barwick
1aa6df95a9 Add initial code for remaining "repmgr standby" commands 2017-05-09 23:08:18 +09:00
Ian Barwick
c7f49541a3 Add "standby unregister" 2017-05-08 23:37:53 +09:00
Ian Barwick
08d2da3443 Fix pointer usage 2017-05-08 15:29:52 +09:00
Ian Barwick
5e48a19ebe "standby clone": process -w/--wal-keep-segment 2017-05-05 21:03:16 +09:00
Ian Barwick
aaa9af2371 "standby clone": fix a couple of regressions 2017-05-05 20:08:14 +09:00
Ian Barwick
bb0aac8912 "standby clone": rsync mode does of course accept -c/--fast-checkpoint 2017-05-05 19:03:33 +09:00
Ian Barwick
22c2f01d87 Process hostname as separate argument 2017-05-05 18:48:39 +09:00
Ian Barwick
7844afa074 Implement "standby register" 2017-05-05 10:50:41 +09:00
Ian Barwick
c41ff2c442 Add some todos 2017-05-04 23:49:55 +09:00
Ian Barwick
bb362bdb7e Various improvements to database parameter handling
With "standby clone" also better indicate whether the repmgr extension
is actually available.
2017-05-04 23:15:28 +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
206a9fd333 More work on "standby clone" 2017-05-01 22:22:31 +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
99e7bb0ea3 Initial code for standby clone 2017-04-27 09:22:09 +09:00
Ian Barwick
bcf55b4f72 Split "action" functions to individual files
repmgr3's repmgr.c file was not far off 10,000 lines - this will make
it easier to manage individual parts of the code.
2017-04-26 22:58:21 +09:00
Ian Barwick
a3a4c441b6 master register: warn if "upstream_node_id" set 2017-04-26 22:18:40 +09:00
Ian Barwick
16a47f5693 master register: add event details if relevant 2017-04-26 22:09:49 +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
2ed5393209 Suppress configuration file warnings if --terse is set 2017-04-26 10:50:43 +09:00
Ian Barwick
1b785d9a20 Add simple output for CLUSTER EVENT 2017-04-26 10:31:56 +09:00
Ian Barwick
5041a49b66 Additional option parsing 2017-04-25 23:29:43 +09:00
Ian Barwick
226ba99804 Refactor command line option checks 2017-04-25 22:26:12 +09:00
Ian Barwick
c8e27956e6 Fix queries and permissions for the repmgr extension 2017-04-25 10:56:55 +09:00
Ian Barwick
451cd16788 Initial code for "standby clone" 2017-04-25 09:18:14 +09:00
Ian Barwick
885bc122df Improve logging output 2017-04-25 08:22:58 +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
Ian Barwick
7d0e061088 Various syntax and include fixes 2017-04-20 17:04:54 +09:00
Ian Barwick
0fb4876256 Initial config file infrastructure
Also unify command line option structure/parsing so everything's
in the same order in the code.
2017-04-20 09:41:50 +09:00
Ian Barwick
8968cfe735 Add logging and repmgr command sanity checks 2017-04-20 00:32:04 +09:00
Ian Barwick
76e8c4624e repmgr: initial runtime option parsing and root execution detection 2017-04-19 23:16:36 +09:00
Ian Barwick
1631917715 Initial table definitions and coding for repmgr client utility 2017-04-19 22:41:20 +09:00
Ian Barwick
e6237cc81a Makefiles and placeholder code 2017-04-18 11:26:51 +09:00