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
Ian Barwick
4f37515113
Pass username to pg_basebackup
2015-01-05 10:29:02 +09:00
Ian Barwick
f23c43b986
Clean up exit error codes
2015-01-05 09:36:48 +09:00
Ian Barwick
38de150436
Fix spelling
2015-01-05 09:23:26 +09:00
Ian Barwick
a80da61203
Remove unneeded parameters
2015-01-04 17:10:29 +09:00
Ian Barwick
4fbe8ca70e
copy_remote_files() now only needs to copy individual files
...
In which case rsync should be an atomic operation
2015-01-04 16:03:27 +09:00
Ian Barwick
1aa12a122f
Selectively copy configuration files if not in master data directory
2015-01-04 15:59:07 +09:00
Ian Barwick
c54d5f9a9c
Add check for max_wal_senders > 0 on master
2015-01-04 08:31:52 +09:00
Ian Barwick
db49206fc5
Clean up logging output
2015-01-04 08:25:50 +09:00
Ian Barwick
017f66e15e
Make --check-master-config state no problems found
2015-01-04 08:15:11 +09:00
Ian Barwick
e06949db87
Add option --check-master-config
...
Consolidate the configuration checks carried out when cloning
a standby, and enable them to be run separately to check the
required configuration without running STANDBY CLONE multiple times.
2015-01-03 11:29:00 +09:00
Ian Barwick
2f6ce44cab
Consolidate server version checks in repmgr
...
Merge basically identical checks in multiple places into a single
function. Only doing this in repmgr, as repmgrd only performs
the version check in one place and we'd need to somehow pass progname
to the function as well, which isn't worth the effort.
2015-01-03 09:25:08 +09:00
Ian Barwick
1f21040fb3
Fix help output formatting
2015-01-03 08:12:13 +09:00
Ian Barwick
4e9c58c7db
Update copyright to 2015
2015-01-03 08:12:13 +09:00
Ian Barwick
4305f76fa9
Remove unused code
2015-01-02 08:27:20 +09:00
Ian Barwick
7700086703
Use pg_basebackup
2014-12-31 11:04:01 +09:00
Ian Barwick
8b69b1e16f
Optionally retrieve server_version string as well
...
In a couple of places we'll need to report the human-readable
version number
2014-12-29 15:52:53 +09:00
Ian Barwick
f94626bf7b
Refactor version number detection
...
Use the reported `server_version_num` integer for version number
detection and comparison. This makes it easier to set an arbitrary
minimum supported version (rather than "9.0 or later") as well
as future-proofing for 10.x and later.
2014-12-29 14:54:04 +09:00
Ian Barwick
6f80cd5441
Add option "--initdb-no-pwprompt"
...
Previously repmgr passed the -W flag to initdb, which forced
manual input of a password; this option removes the -W flag
to make repetitive testing easier.
2014-12-24 19:07:08 +09:00
Ian Barwick
ee69730f8b
Error message correction
2014-12-24 15:36:03 +09:00
Ian Barwick
28fd9d5aeb
Spelling
2014-12-22 16:21:08 +09:00
Ian Barwick
24b2ee09b3
Add -S/--superuser option for witness database creation
...
Previously the witness database creation code was hard-coding the
username 'postgres' when accessing the previously initialised database.
However initdb was not passed any explicit username, meaning the
default database superuser name was the same as the user running
repmgr.
With this patch, a superuser user name (default: postgres) will
be passed to initdb.
Per report by eggyknap [1]
[1] https://github.com/2ndQuadrant/repmgr/issues/38
2014-12-22 16:01:58 +09:00
Ian Barwick
763881b1ed
Whitespace cleanup
2014-12-18 10:52:20 +09:00
Ian Barwick
94f520e1de
Fix variable name
2014-12-09 15:14:41 +09:00
Marco Nenciarini
f72bb2f093
Fix syntax errors in repmgr.c
2014-10-30 12:09:55 +01:00
Jaime Casanova
927667905e
Code review: Do not use psql on do_witness_create,
...
use createdb and createuser binaries instead
2014-10-29 19:25:14 -05:00
Jaime2ndQuadrant
684d66f48e
Merge pull request #27 from Nexperteam/witness-fixes
...
Witness fixes: create a db and user to avoid using postgres
This is so, we can create the appropiate user and database on the witness.
2014-10-29 19:05:38 -05:00
Jaime2ndQuadrant
406c325ccb
Merge pull request #23 from wamonite/fix_witness
...
fix: witness creation and monitoring.
On copy_configuration() we are using the res variable when is still used on the loop.
2014-10-29 18:44:53 -05:00
Martín Marqués
dc0dfe9b56
If the user doesn't pass the port on which the primary server is listening
...
we have to assume it's the DEFAULT_MASTER_PORT.
This was not done, so we added a check to see if it has a value that is
usable, else we use DEFAULT_MASTER_PORT.
2014-09-29 16:06:05 -03:00
Ian Barwick
0cbd5d3933
Fix log messages in do_standby_promote()
...
Initial connection is to current standby, before attempting to
connect to old master.
2014-07-07 11:30:29 +09:00
Ian Barwick
98c5215871
Change successful standby promotion message to log level 'NOTICE'
...
Was previously 'ERROR'.
2014-07-07 11:09:07 +09:00