Commit Graph

1210 Commits

Author SHA1 Message Date
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 2eec17e25f Add headers as dependencies in Makefile 2016-03-30 10:28:41 +09:00
Ian Barwick c48c248c15 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-29 16:49:28 +09:00
Martín Marqués 958e45f2b8 Merge pull request #165 from dhyannataraj/master
Better use /24 network mask in this example
2016-03-28 13:32:09 -03:00
Nikolay Shaplov daafd70383 Better use /24 network mask in this example 2016-03-28 18:56:50 +03:00
Ian Barwick c828598bfb It's unlikely this situation will occur on a witness server
Which is why the error message is for master/standby only.
2016-03-28 15:53:25 +09:00
Ian Barwick b55519c4a2 Add hint about registering the server after cloning it.
This step is easy to forget.
2016-03-02 09:41:06 +09:00
Ian Barwick 4cafd443e1 README: Add note about 'repmgr_funcs' 2016-02-25 16:36:19 +09:00
Ian Barwick d400d7f9ac repmgrd: fix error message 2016-02-24 15:33:36 +09:00
Ian Barwick 62bb3db1f8 Fix code comment 2016-02-24 15:27:08 +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 d9961bbb17 Minor fixes to README.md 2016-02-23 14:25:26 +09:00
Ian Barwick e1b8982c14 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 07:36:41 +09:00
Martin 2fe3b3c2a3 Fix a few paragraphs from the README.md. 2016-02-22 09:20:11 -03:00
Ian Barwick c6e1bc205a Prevent repmgr/repmgrd running as root 2016-02-22 14:58:17 +09:00
Ian Barwick 7241391ddc 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-16 14:28:33 +09:00
Ian Barwick c8f449f178 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-09 15:59:28 +09:00
Ian Barwick 49420c437f README.md: update witness server section 2016-02-09 15:58:51 +09:00
Ian Barwick 827ffef5f9 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-09 15:11:50 +09:00
Ian Barwick 16296bb1c3 Bump dev version number 2016-02-01 15:10:03 +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