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
2c55accbdd
README: clarify supported versions
2016-09-19 20:59:35 +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
Abhijit Menon-Sen
4d36712901
Another typo fix
2016-09-17 14:15:50 +05:30
Abhijit Menon-Sen
7c3c30ae4a
More typo fixes from Andreas
2016-09-17 14:02:26 +05:30
Abhijit Menon-Sen
7e6491a6d6
Fix typo, thanks to Andreas Kretschmer
2016-09-16 21:05:09 +05:30
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
cc3c2f5073
Merge branch 'conninfo-fixes'
...
Refactor recovery.conf generation to take into account the node being
cloned from might not be the intended upstream node, e.g. "grandchild"
node being cloned direct from the master ("grandparent") rather than
the intended parent node.
This extends functionality introduced with Barman support and ensures
that behaviour of cascaded standby cloning is consistent, regardless
of cloning method.
2016-09-05 13:16:31 +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
a55c224510
README: add note about cloned standby configuration.
2016-08-25 09:33:52 +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
3ea61689eb
repmgr.conf.sample: change db and user names in conninfo string
...
They now match the examples given in README.md
2016-08-23 14:11:04 +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
5a7ce552f0
"renumber" deprecated command line options without a short version
...
This will keep them out of the main list.
2016-08-17 14:51:32 +09:00
Ian Barwick
ef7bed1b3d
repmgrd: refactor standby monitoring status query and code
...
This had grown somewhat complex with addition of handling for
various corner cases. Much of the work has now been delegated
to the query itself.
2016-08-16 19:15:58 +09:00
Ian Barwick
6bd1c6a36d
Skip largely pointless master reconnection attempt.
...
Experimental - see notes in code.
2016-08-16 13:25:39 +09:00
Ian Barwick
9831cabd4d
Minor refactoring of do_master_failover()
...
- rename some variables for clarity
- ensure all structures are initialised correctly
- update code comments
2016-08-16 11:23:59 +09:00
Ian Barwick
d244fb29d7
Update HISTORY
2016-08-15 13:15:55 +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
fb6109b3e6
Update README.md
...
Note default usage of `pg_basebackup --xlog-method=stream`.
2016-08-15 10:16:22 +09:00
Martín Marqués
b314f5aaf4
Merge pull request #225 from ryno83/patch-1
...
Update README.md
2016-08-12 19:52:25 +02:00
Renaud Fortier
7fc340a8e2
Update README.md
...
I think this will improve the readme.
2016-08-12 10:28:31 -04:00
Ian Barwick
e4c8bd981b
Update HISTORY
2016-08-12 09:59:10 +09:00
Ian Barwick
a310417a49
Refactor standby monitoring query
...
Addresses GitHub #224
2016-08-11 17:28:16 +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