Ian Barwick
ac8910000f
repmgr: Explicitly set permissions on recovery.conf to 0600
...
Per GitHub #236 (dmarck)
2016-09-09 11:39:55 +09:00
Ian Barwick
171df20386
repmgr: avoid (null) in local_command debug output
2016-09-01 12:14:36 +09:00
Ian Barwick
2105837ef4
repmgr: in standby clone, always add user-supplied connection information to upstream default parameters
...
Also misc other cleanup and documentation.
2016-09-01 12:06:19 +09:00
Ian Barwick
d12ecba63c
repmgr: fix Barman error message in standy clone
...
Report the Barman catalogue name for the managed server, not the
hostname of the Barman server itself.
2016-08-31 13:50:16 +09:00
Ian Barwick
5276cb279c
repmgr: add correct return codes for get_tablespace_data()
...
Remove unused variable retval.
2016-08-31 13:46:44 +09:00
Ian Barwick
719ad3cf95
repmgr: properly remove temporary directory created when cloning from Barman
2016-08-31 13:37:17 +09:00
Ian Barwick
e87399afc1
Clean up create_recovery_file() function
...
Caller is responsible for providing a t_conninfo_param_list from which
the value for "primary_conninfo" is created.
2016-08-31 13:03:59 +09:00
Ian Barwick
1d05345aa3
Add error code ERR_BARMAN
...
Indicates unrecoverable error condition when accessing the barman server
2016-08-31 11:41:55 +09:00
Ian Barwick
a8afa843ee
Add parameter checks and help output for --no-upstream-connection
2016-08-31 11:35:23 +09:00
Ian Barwick
5c4b477d84
Consolidate various checks in do_standby_clone()
2016-08-31 11:03:44 +09:00
Ian Barwick
f8fe801225
use repmgr db connection with barman
2016-08-31 09:53:18 +09:00
Ian Barwick
d7456d879d
Add option --no-upstream-connection and parse Barman conninfo string
2016-08-31 09:30:03 +09:00
Ian Barwick
751469a08d
Check SSH and create data dir early
...
so we can init the barman stuff, which we want to verify the
upstream conninfo
2016-08-31 09:28:50 +09:00
Ian Barwick
afa5c1469b
Actually differentiate between clone source node and defined upstream node
2016-08-31 09:28:36 +09:00
Ian Barwick
1778eeab9c
Initial change for differentiating between host we're cloning from and the defined upstream
2016-08-31 09:25:11 +09:00
Gianni Ciolli
95de5ef976
Bug fix
2016-08-31 09:23:36 +09:00
Gianni Ciolli
c0eea90402
Cascading replication support for Barman mode
...
If upstream_node is specified, we point the standby to that node;
otherwise we point it to the current primary node.
2016-08-31 09:23:25 +09:00
Gianni Ciolli
135fa2e1b9
Fixing primary_conninfo generation ( #232 )
...
After introducing Barman mode, it is no longer true that STANDBY CLONE
can derive primary_conninfo from the connection to the master. Now we
ask Barman how to connect to a valid cluster node, and then we fetch
the conninfo for the current master from repmgr metadata.
2016-08-30 10:45:22 +09:00
Gianni Ciolli
2a8861be8b
Fixing inaccurate option checking ( #230 )
...
The incompatibility between Barman mode and use_replication_slots was
not checked properly, and did not cause repmgr to exit.
2016-08-30 08:33:41 +09:00
Ian Barwick
844b9f54e4
Merge branch 'github-234-repmgrd-no-schema'
2016-08-25 09:21:03 +09:00
Ian Barwick
8de84707d9
Always use PQstatus to check connection status
...
This addresses GitHib #234 .
2016-08-25 08:35:47 +09:00
Ian Barwick
efb106f8a0
Pass ssh_options when executing a remote command.
...
This resolves GitHub #233 .
2016-08-22 14:34:48 +09:00
Ian Barwick
5baec14a1e
Add repmgr.conf setting 'barman_config'
...
Enables provision of a non-default Barman configuration file.
2016-08-18 15:06:06 +09:00
Ian Barwick
fe469fe188
Merge pull request #191 from gciolli/feature-barman-support
...
Add Barman support to repmgr standby clone
2016-08-18 15:04:46 +09:00
Ian Barwick
4a349f7224
repmgr: emit warning if a deprecated command line option is used
2016-08-15 12:27:55 +09:00
Ian Barwick
9a07686ceb
When the output of a remote command isn't required, ensure it's consumed anyway
...
This fixes a regression introduced with commit 85f68e9f77
Also clean up some code made redundant by same.
2016-08-11 08:46:55 +09:00
Ian Barwick
45aa0724c4
Update HISTORY
...
Also remove code comment obsoleted by previous commit
2016-08-09 15:32:56 +09:00
Ian Barwick
a558e9379e
Merge branch 'gciolli-fix_219'
...
PR #220 resolving GitHub #219
2016-08-09 15:29:59 +09:00
Gianni Ciolli
85f68e9f77
Only collect remote command output if the caller requires it
...
This addresses GitHub #216 and #167 .
2016-08-09 14:14:52 +09:00
Gianni Ciolli
48f637486d
Now STANDBY SWITCHOVER and STANDBY FOLLOW log an event notification on
...
success and also on some failures, precisely those when it makes sense
or it is reasonably possible to do so.
2016-08-05 14:19:04 +02:00
Gianni Ciolli
3bccd79510
Two bugfixes to Barman mode
...
- we forgot to recreate an empty pg_replslot;
- we parse tablespace info more safely.
2016-08-04 14:40:24 +02:00
Gianni Ciolli
7ca9ff6d54
Reindenting do_standby_clone (no code change).
2016-08-04 14:40:24 +02:00
Gianni Ciolli
2f529e20c1
Barman support, draft #1
...
TODO: we need to check what happens with configuration files placed in
non-standard locations.
2016-08-04 14:40:23 +02:00
Gianni Ciolli
9853581d12
Introduce a Cell List to store tablespace data
2016-08-04 14:40:23 +02:00
Gianni Ciolli
ecdae9671f
Factor out tablespace metadata retrieval
...
The purpose of this commit is to prepare the terrain for non-default
tablespace support in the forthcoming Barman support.
2016-08-04 14:40:23 +02:00
Gianni Ciolli
1f3e937bbe
Add local_command function to run commands locally
2016-08-04 14:40:23 +02:00
Ian Barwick
89aeccedc2
Various bugfixes and code documentation improvements
2016-08-04 12:31:24 +09:00
Ian Barwick
d9bda915bb
Update documentation and --help output for witness register
...
This completes the implementation of GitHub #186
2016-08-04 10:36:26 +09:00
Ian Barwick
c565be4ab6
Improve database connection status checking
2016-08-04 10:36:21 +09:00
Ian Barwick
c26fd21351
Implement repmgr standby register command
2016-08-04 10:36:16 +09:00
Ian Barwick
6b57d0e680
Separate witness registration into do_witness_register()
2016-08-04 10:36:12 +09:00
Ian Barwick
6faf029c93
Add witness unregister command info in help output
2016-08-02 18:39:04 +09:00
Ian Barwick
c42437a4f2
standby/witness unregister - enable even if node isn't running
...
If the `--node` option is provided with the id of the node to unregister,
the action can be executed on any node.
This addresses GitHub #211 .
2016-08-02 17:09:27 +09:00
Ian Barwick
d0c05e6f46
Clean up command line option handling and help output
...
- properly distinguish between the command line option -? and getopt's
unknown option marker '?'
- remove deprecated command line options --initdb-no-pwprompt and
-l/--local-port
- add witness command summary in help output
2016-08-02 14:40:13 +09:00
Ian Barwick
050f007cc2
Initial implementation of witness unregister
2016-08-02 12:22:54 +09:00
Ian Barwick
e0a61afb7d
Suppress connection error display in repmgr cluster show
...
This prevents connection error messages being mixed in
with `repmgr cluster show` output. Error message output can
still be enabled with the --verbose flag.
Fixes GitHub #215
2016-08-01 14:57:40 +09:00
Ian Barwick
bbc88ce05c
Miscellaneous code cleanup and typo fixes
2016-07-28 16:32:07 +09:00
Ian Barwick
02668ee045
Parse the contents of the "pg_basebackup_options" parameter in repmgr.conf
...
This is to ensure that when repmgr executes pg_basebackup it doesn't
add any options which would conflict with user-supplied options.
This is related to GitHub #206 , where the -S/--slot option has been
added for 9.6 - it's important to check this doesn't conflict with
-X/--xlog-method.
While we're at it, rename the ErrorList handling code to ItemList
etc. so we can use it for generic non-error-related lists.
2016-07-26 16:12:43 +09:00
Ian Barwick
36eb26f86d
Mark some variables as static.
2016-07-26 11:40:26 +09:00
Ian Barwick
cbc2c7b3e6
From PostgreSQL 9.6, use pg_basebackup's -S/--slot option if appropriate
...
GitHub #206
2016-07-26 10:35:30 +09:00