Commit Graph

1046 Commits

Author SHA1 Message Date
Ian Barwick cf0cdfa6a1 Bump version
3.1.2rc1
2016-03-31 14:56:49 +09:00
Ian Barwick 31489d92c0 Check directory entity filetype in a more portable way 2016-03-30 20:21:41 +09:00
Ian Barwick b7fd13aed2 Fix pg_ctl path generation in do_standby_switchover() 2016-03-30 16:46:57 +09:00
Ian Barwick 3c4bf27aa7 Add headers as dependencies in Makefile 2016-03-30 15:06:15 +09:00
Ian Barwick 0ebd9c15d9 Regularly sync witness server repl_nodes table.
Although the witness server will resync the repl_nodes table following
a failover, other operations (e.g. removing or cloning a standby)
were previously not reflected in the witness server's copy of this
table.

As a short-term workaround, automatically resync the table at regular
intervals (defined by the configuration file parameter
"witness_repl_nodes_sync_interval_secs", default 30 seconds).
2016-03-30 15:06:12 +09:00
Nikolay Shaplov f9dba283d4 Better use /24 network mask in this example 2016-03-30 15:05:29 +09:00
Ian Barwick 205f1cebbb It's unlikely this situation will occur on a witness server
Which is why the error message is for master/standby only.
2016-03-30 15:05:26 +09:00
Ian Barwick 4d97c1ebf7 Add hint about registering the server after cloning it.
This step is easy to forget.
2016-03-30 15:05:20 +09:00
Ian Barwick 12c395e91f README: Add note about 'repmgr_funcs' 2016-03-30 15:05:17 +09:00
Ian Barwick bd1e4f71d6 repmgrd: fix error message 2016-03-30 15:05:10 +09:00
Ian Barwick cb49071ea4 Fix code comment 2016-03-30 15:05:06 +09:00
Ian Barwick 5ad674edff Bump version
3.1.1
v3.1.1
2016-02-23 15:56:24 +09:00
Ian Barwick ac09bad89c Minor fixes to README.md 2016-02-23 14:37:59 +09:00
Ian Barwick 009d92fec8 Ensure witness node is registered before the repl_nodes table is copied
This fixes a bug introduced into the previous commit, where the
witness node was registered last to prevent a spurious node record
being created even if witness server creation failed.
2016-02-23 14:37:54 +09:00
Martin b3d8a68a1d Fix a few paragraphs from the README.md. 2016-02-23 14:37:48 +09:00
Ian Barwick 05b47cb2a8 Prevent repmgr/repmgrd running as root 2016-02-23 14:37:44 +09:00
Ian Barwick dc542a1b7d Better handling of errors during witness creation
Ensure witness is only registered after all steps for creation
have been successfully completed.

Also write an event record if connection could not be made to
the witness server after initial creation.

This addresses GitHub issue #146.
2016-02-23 14:37:39 +09:00
Ian Barwick 6ce8058749 witness creation: extract database and user names from the local conninfo string
99.9% of the time they'll be the same as the primary connection, but
it's more consistent to use the provided local conninfo string
(from which the port is already extracted).
2016-02-23 14:37:31 +09:00
Ian Barwick 2edcac77f0 README.md: update witness server section 2016-02-23 14:37:27 +09:00
Ian Barwick f740374392 Add '-P/--pwprompt' option for "repmgr create witness"
Optionally prompt for superuser and repmgr user when creating a witness.
This ensures a password can be provided if the primary's pg_hba.conf
mandates it.

This deprecates '--initdb-no-pwprompt'; and changes the default behaviour of
"repmgr create witness", which previously required a superuser password
unless '--initdb-no-pwprompt' was supplied.

This behaviour is more consistent with other PostgreSQL utilities such
as createuser.

Partial fix for GitHub issue #145.
2016-02-23 14:37:23 +09:00
Ian Barwick c9c18d6216 Update comments in SQL upgrade file v3.1 2016-02-01 13:49:58 +09:00
Ian Barwick d21f506614 Add placeholders for old FAILOVER.rst and QUICKSTART.md pointing to new README.md 2016-02-01 08:02:37 +09:00
Ian Barwick fbad18085e README.md: formatting and spelling fixes 2016-01-29 17:09:12 +09:00
Ian Barwick ca08b1c3bb REAMDE.md: formatting 2016-01-29 16:55:47 +09:00
Ian Barwick 3d95fab0ac README.md: minor corrections 2016-01-29 16:47:12 +09:00
Ian Barwick 12d6ce4629 Bump version 2016-01-28 16:09:06 +09:00
Ian Barwick dfb34ae7b6 Update HISTORY 2016-01-28 11:44:28 +09:00
Ian Barwick 98c4eb002a README: add replication slot example 2016-01-28 11:43:42 +09:00
Ian Barwick faed8a65f7 Add new README file
Replaces existing legacy documentation.
2016-01-28 11:32:19 +09:00
Ian Barwick a81cf04614 Update various comments 2016-01-28 11:13:38 +09:00
Ian Barwick ca6cbcf965 Add sanity checks to be sure pg_rewind can be used before executing a switchover 2016-01-28 09:25:00 +09:00
Ian Barwick 16c1e13019 Sanity check for presence of pg_rewind on remote server 2016-01-28 07:25:23 +09:00
Ian Barwick 1375adcac8 Standardize capitalisation in log messages 2016-01-28 07:24:45 +09:00
Ian Barwick e859a58405 Change some repmgrd log messages to NOTICE
So key events during failover on promoted and following standbys
logged at the same level.
2016-01-27 18:39:27 +09:00
Ian Barwick 1a6d830314 Various logging, help output and comment tweaks 2016-01-27 17:10:54 +09:00
Ian Barwick a96f478a43 Allow negative values in configuration parameters, where appropriate.
Make the code match the documentation.

As pointed out by GitHub user phyber (#142).

Also various other minor improvements to error reporting during
config file parsing.
2016-01-27 09:10:19 +09:00
Ian Barwick 8f20ab16dd Display default log level in -?/--help output 2016-01-25 14:39:21 +09:00
Ian Barwick 3ec436f30d Better document default values in repmgr.conf.sample 2016-01-22 15:22:22 +09:00
Ian Barwick 61e00bf1c7 Improve handling of default connection parameters 2016-01-22 14:14:14 +09:00
Ian Barwick 5d71869fc1 --help output: put default values in quotation marks
Similar to psql.
2016-01-20 15:56:26 +09:00
Ian Barwick 7598e08b6f Display default connection options in --help output 2016-01-20 15:46:41 +09:00
Ian Barwick ba71e1eedf Use maxlen_snprintf() in do_witness_create() 2016-01-20 15:13:52 +09:00
Ian Barwick a4c07b23fb Document --pg_rewind option in help output 2016-01-20 15:09:03 +09:00
Ian Barwick 0c36f921f7 help() -> do_help()
For consistency and easier location of the function body.
2016-01-20 15:02:03 +09:00
Ian Barwick 8ac5a5444e Enable repmgr standby switchover for 9.3/9.4 by recloning
A bit of a hack and unsuited for large databases - install
pg_rewind instead. Or upgrade to 9.5.
2016-01-20 14:51:16 +09:00
Ian Barwick f60e7346e2 Don't copy 'recovery.done' or 'recovery.conf' when cloning a standby
'recovery.conf' will be overwritten, but we don't want a 'recovery.done'
for another server.
2016-01-20 14:34:13 +09:00
Ian Barwick 855ca8fe1a Support separately-compiled pg_rewind for "repmgr standby switchover" in 9.3/9.4 2016-01-20 14:21:02 +09:00
Ian Barwick daa79d1a0f Remove any recovery.done file copied in by pg_rewind
It'll be the old standby/new primary's old recovery.conf file,
which we don't want floating about confusing things.
2016-01-20 13:18:52 +09:00
Ian Barwick 211768d911 Support pg_rewind when executing "repmgr standby switchover"
9.5 and later.
2016-01-20 13:05:47 +09:00
Ian Barwick f982708b35 Add function test_db_connection()
The difference between this and establish_db_connection() is that
it outputs any connection failure as a [NOTICE] rather than an
[ERROR]; it's intended for use in e.g. polling a server to wait
for it to come up/go down, while preventing [ERROR] log lines
which may cause confusion.
2016-01-20 07:56:03 +09:00