Ian Barwick
da4dc26505
repmgr: various minor logging fixes
2016-09-28 15:51:26 +09:00
Ian Barwick
19670db1d4
repmgr: add missing 'break' statements in switch structure
2016-09-28 15:41:29 +09:00
Ian Barwick
b9f52e74eb
repmgr: add --help output and documentation for --wait-sync
2016-09-28 14:22:26 +09:00
Ian Barwick
fa10fd8493
repmgr: add option --wait-sync for standby register
...
Causes repmgr to wait for the updated node record to propagate
to the standby before exiting. This can be used to ensure that
actions which depend on the standby's node record being synchronised
(such as starting repmgrd) are not carried out prematurely.
Addresses GitHub #103
2016-09-28 14:08:42 +09:00
Ian Barwick
bbb2e2f017
Initial implementation of improved configuration file copying
...
GitHub #210 .
2016-09-27 22:19:45 +09:00
Ian Barwick
65c2be3441
Remove redundant code
2016-09-26 10:44:34 +09:00
Ian Barwick
b17593ff4d
repmgr: improve handling application name during standby clone
...
Addresses issues noticed while investigating GitHub #238
2016-09-26 10:41:01 +09:00
Ian Barwick
7c1776655b
repmgr: correctly set application name during standby follow
...
Addresses issue mentioned in GitHub #238
2016-09-25 21:33:11 +09:00
Ian Barwick
789470b227
repmgr: rename 'upstream_conninfo' etc. to 'recovery_conninfo' etc.
...
These variables are used only for generating `primary_conninfo` in recovery.conf,
rename to make their purpose clearer.
2016-09-25 19:18:54 +09:00
Martin
5d3c0d6163
Make it clear in the error message that the type of connection that
...
failed was an SSH connection, not a libpq one.
2016-09-23 09:15:09 -03:00
Ian Barwick
44d4ca46b0
repmgr: place write_primary_conninfo() next to the other recovery.conf functions
...
Also terminate the buffer created, for tidiness.
2016-09-22 10:10:26 +09:00
Ian Barwick
114c1bddcb
repmgr: only require 'wal_keep_segments' to be set in certain corner cases
...
Now that repmgr uses pg_basebackup's `--xlog-method=stream` setting by
default, and enables provision of `restore_command`, there's no reason
to require `wal_keep_segments` to be set in the default use-case.
`repmgr standby clone` will now only fail with an error if `wal_keep_segments`
is zero and one of the following cases applies:
* `--rsync-only` clone with no `restore_command` set
* clone with pg_basebackup and `--xlog-method=fetch`
* -w/--wal-keep-segments specified on the command line
If, for whatever reason, it's necessary to perform a standby clone
with `wal_keep_segments=0` in one of the above cases, specifying
`-w/--wal-keep-segments=0` on the command line will effectively
override the check.
GitHub #204
2016-09-21 16:42:14 +09:00
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