Ian Barwick
5090b8cab1
Update HISTORY
2016-09-21 13:39:42 +09:00
Ian Barwick
5e338473f7
repmgr: before cloning a standby, verify sufficient free walsenders available
...
Previously repmgr only checked that 'max_wal_senders' is a positive value.
It will now additionally verify that the requisite number of replication
connections can actually be made before commencing with a cloning operation
using pg_basebackup.
GitHub #214
2016-09-21 12:36:17 +09:00
Ian Barwick
e043d5c9a9
Clarify requirements for passwordless SSH access
...
This is already effectively optional; in 3.2 we will ensure it becomes
fully optional (mainly by deprecating --ignore-external-config-files
and replacing it with --copy-external-config-files).
2016-09-21 08:43:45 +09:00
Ian Barwick
03911488aa
repmgr: in standby switchover, quote file paths in remotely executed commands
...
Per suggestion from GitHub user sebasmannem (#229 )
2016-09-21 08:09:44 +09:00
Ian Barwick
3e51a85e07
repmgr: consolidate error messages during replication slot generation
...
Return error messages to the called so they can be logged as events;
prevent log message duplication in one case.
2016-09-20 09:16:33 +09:00
Ian Barwick
036c59526a
repmgr: in switchover mode, prevent checks for local config file if not provided
...
In switchover mode, if no remote repmgr config file is provided with `-C`,
repmgr attempts to look for a file with the same path as the local
file (provided with `-f/--config-file`). However if this was not specified,
repmgr would execute `ls` with an empty filepath on the remote host, which
appeared to succeed, causing subsequent remote repmgr command executions
to fail as a blank value was provided for `-f/--config-file`.
Fixes GitHub #229 .
2016-09-19 21:24:49 +09:00
Ian Barwick
3ce231a571
Ensure get_pg_settings() returns false if parameter not found
...
Previously, if e.g. a non-superuser connection is used to get a value
like `data_directory`, which is available to superusers only, it
would return true.
2016-09-19 14:08:27 +09:00
Ian Barwick
178b380f34
Explictly specify pg_catalog path in all system queries
2016-09-19 14:08:20 +09:00
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