Ian Barwick
ba254d2f06
Clarify comment
2015-02-24 16:00:28 +09:00
Ian Barwick
3e6659dda0
Modify log message for consistency and testing
...
Pre-3.0: 'repmgr standby clone complete'
3.0: 'repmgr standby clone (using pg_basebackup) complete' or
'repmgr standby clone (using rsync) complete'
2015-02-20 12:29:15 +09:00
Ian Barwick
b453c6a533
Fix master port check
...
Check introduced in dc0dfe9b56
was comparing the provided database name instead of the port.
2015-02-12 14:44:05 +09:00
Jaime Casanova
eabb3cb1ab
Add "--checksum" in rsync when using "--force"
...
If the user don't put that option in rsync_options using of "--force"
could be unsafe.
While the probability of failures because of this are low they aren't
zero.
2015-02-11 10:38:35 +09:00
Ian Barwick
2d82ade170
Clarify error message
2015-02-10 10:21:17 +09:00
Ian Barwick
21730899da
Clarify error message.
...
Avoid implying there's a configuration file if none was provided.
2015-02-10 10:08:49 +09:00
Ian Barwick
94bc5bdf80
Remove unneeded function
2015-02-09 18:31:18 +09:00
Ian Barwick
1369fe5c79
Rename 'test_mode' to 'target_directory_provided'
...
Which describes its meaning more accurately.
Also update some comments.
2015-02-09 16:32:21 +09:00
Ian Barwick
e71dd4945e
Remove duplicated error message
2015-02-09 13:42:51 +09:00
Ian Barwick
49d1abf130
rempgr: adapt tablespace handling for 9.4 and later
...
See note in code about 9.3.
Also ensure that no empty parameters are passed to pg_basebackup.
2015-02-09 13:39:18 +09:00
Ian Barwick
1d28a2d08e
runtime_options.wal_keep_segments is prepopulated with default value
...
Explicitly track if setting came from command line parameter.
2015-02-05 11:55:52 +09:00
Ian Barwick
9ceef937eb
Emit warning if -w/--wal-keep-segments used when use_replication_slots set
2015-02-05 11:17:23 +09:00
Ian Barwick
f047ec9526
Use DEFAULT_WAL_KEEP_SEGMENTS in help output instead of hard-coded number
2015-02-04 14:08:55 +09:00
Ian Barwick
a3f0e89a05
Improve pg_bindir parameter handling
...
Previously, the pg_bindir parameter was mandatory and could only be
provided in the repmgr.conf file, which was leading to the slightly
bizarre situation that e.g. for "clone standby", repmgr was complaining
that it didn't want the configuration file when it actually did.
pg_bindir is now optional - if not provided, it will use the default
path. It can be provided in the repmgr.conf file, or as a command
line parameter; the latter overrides the former.
2015-02-04 14:04:04 +09:00
Ian Barwick
3d9d0d98af
Improve repmgr configuration file handling
...
Previous behaviour was somewhat counterintuitive, with an error
message being logged if no configuration file provided or found,
even though this is not actually an error.
Configuration files now handled like this:
- if a configuration file is explicitly provided (-f), error out
if not found.
- if no configuration file explicitly provided, attempt to open
default configuration file; if this does not exist, log
notice and continue with default values.
Also, for 9.4 and later add a hint about replication slot usage
if 'use_replication_slots' not set.
2015-02-04 09:57:51 +09:00
Ian Barwick
49debcdf92
Add version check if replication slot usage requested
...
Replication slots require 9.4 or greater
2015-02-02 22:16:04 +09:00
Ian Barwick
7a760c32ff
Store slot name in repl_nodes table
2015-02-02 17:57:15 +09:00
Ian Barwick
b4b5e6cd30
do_standby_clone(): rename conn to primary_conn
...
For clarity.
2015-02-02 16:53:35 +09:00
Ian Barwick
2ece014952
Initial support for physical replication slots
...
Todo:
- if slots specified in repmgr.conf, verify server version
- store generated slot name in `repl_nodes` table
2015-02-02 15:53:53 +09:00
Ian Barwick
01360c3d39
Improve repl_status view.
2015-01-29 15:08:37 +09:00
Ian Barwick
031a726f04
Enable get_master_connection() to accept a null value for master_id
...
Saves worrying about the purpose of various superfluous ints
2015-01-29 11:25:01 +09:00
Ian Barwick
c413cff461
Function to update node records
2015-01-16 14:14:04 +09:00
Ian Barwick
a82d37e48a
Improve node metadata and upstream connecting mechanism
...
To handle cascaded replication we're going to have to keep track
of each node's upstream node. Also enumerate the node type
("primary", "standby" or "witness") and mark if active.
2015-01-16 10:28:02 +09:00
Ian Barwick
4b6c097a3e
Use AS for consistency
2015-01-16 08:46:28 +09:00
Ian Barwick
3dfa33d01d
Store upstream node ID if set
...
Required to manage cascaded standbys
2015-01-16 00:29:43 +09:00
Ian Barwick
a20afe28ec
Add upstream_node_id to repl_nodes table
2015-01-15 23:54:07 +09:00
Ian Barwick
692204e381
Consolidate duplicated schema check code
2015-01-15 18:34:51 +09:00
Ian Barwick
d141d2a8aa
Remove unused variable
2015-01-14 16:25:24 +09:00
Ian Barwick
fc6f5ddaa7
Add function repmgr_get_primary_conninfo()
2015-01-14 16:23:08 +09:00
Ian Barwick
5db6489ae5
Initial support for cascaded standbys
2015-01-14 14:18:57 +09:00
Ian Barwick
2ff24fecf2
Remove redundant constant
2015-01-12 13:16:13 +09:00
Ian Barwick
822867ec24
Fix thinko
2015-01-12 09:40:47 +09:00
Ian Barwick
e958b8f2d7
Fix typo
2015-01-09 18:44:31 +09:00
Ian Barwick
74a963a10e
Fix schema quoting
...
There was a lot of duplicated/unused related to handling the
schema name; consolidated and rationalised.
2015-01-09 15:51:34 +09:00
Ian Barwick
dd064cb47c
res1 -> res
2015-01-09 11:20:07 +09:00
Ian Barwick
17de82493a
Consolidate repl_node insert statements
2015-01-09 11:14:47 +09:00
Ian Barwick
f2fa60f5cf
Tidy up SQL statements
...
Improves readability
2015-01-09 09:46:41 +09:00
Ian Barwick
7c15176646
Clean up comments
2015-01-08 14:04:43 +09:00
Ian Barwick
97cbd7d557
Remove superfluous variable
2015-01-08 13:23:33 +09:00
Ian Barwick
5798241205
Add 'recovery_target_timeline = latest' to recovery.conf
...
Also revert to generating our own recovery.conf rather than using
pg_basebackup's minimal file.
2015-01-08 10:46:49 +09:00
Ian Barwick
5b5b4cd4cd
Remove redundant comment
2015-01-08 09:51:53 +09:00
Ian Barwick
a5b5e3d384
No need to store master version number here
2015-01-07 08:55:17 +09:00
Ian Barwick
241622694d
Remove support for pre-9.3 servers
2015-01-06 14:53:26 +09:00
Ian Barwick
687872e979
get_data_directory() -> get_pg_setting()
...
More code consolidation
2015-01-06 13:47:31 +09:00
Ian Barwick
3033f2dfaf
Fix get_cluster_size()
...
Was returning a pointer to a cleared PQresult
2015-01-06 10:30:33 +09:00
Ian Barwick
718024454e
Add function get_data_directory()
...
Consolidate duplicate code
2015-01-06 10:06:58 +09:00
Ian Barwick
ba4413ce91
Change any log messages using 'master' to 'primary'
...
For consistency, as 'master' is the preferred terminology in repmgr
2015-01-06 08:19:48 +09:00
Ian Barwick
e85e0732ef
Nope, no real point doing that here
2015-01-05 22:55:58 +09:00
Ian Barwick
97fb3dbb14
Have 'standby promote' use 'pg_ctl promote'
2015-01-05 21:28:11 +09:00
Ian Barwick
8e09e7b57c
Fix error code handling
2015-01-05 10:49:21 +09:00