Commit Graph

41 Commits

Author SHA1 Message Date
Ian Barwick
409eb47e2a doc: convert documentation to DocBook XML
This brings the repmgr documentation build system in line with that
used by the main PostgreSQL project, and removed the restriction
that documentation must be built against PostgreSQL 9.6 or earlier.

Main formatting changes are:

 - convert empty-element tags (mainly <xref/>)
 - put <indexterm> sections in the correct location
 - correct usage of various entities.
2019-05-09 16:24:21 +09:00
Ian Barwick
aef8e31897 Bump master branch to 4.4dev 2019-03-28 17:24:36 +09:00
John Naylor
4f9fc56871 Fix assorted Makefile bugs
1. The target additional-maintainer-clean was misspelled as
maintainer-additional-clean.

2. Add add missing clean targets, in particular sysutils.o, config.h,
repmgr_version.h, and Makefile.global. While at it, use a wildcard
for obj files.

3. Don't delete configure.

4. Remove generated file doc/version.sgml from the repo.

5. Have maintainer-clean recurse to the doc directory.
2019-03-15 16:29:31 +09:00
Ian Barwick
b1875a8d91 Split command execution functions into separate library
These may need to be executed by repmgrd.
2019-02-27 14:41:17 +09:00
Ian Barwick
5f1bf0fb8f Bump master branch to 4.3dev 2018-11-16 12:50:04 +09:00
Ian Barwick
56173d94a9 Fix Makefile for VPATH builds under PostgreSQL 11 2018-10-22 16:38:18 +09:00
Ian Barwick
2491b8ae52 Add functionality to "pause" repmgrd
In some circumstances, e.g. while performing a switchover, it is essential
that repmgrd does not take any kind of failover action, as this will put
the cluster into an incorrect state.

Previously it was necessary to stop repmgrd on all nodes (or at least
those nodes which repmgrd would consider as promotion candidates), however
this is a cumbersome and potentially risk-prone operation, particularly if the
replication cluster contains more than a couple of servers.

To prevent this issue from occurring, this patch introduces the ability
to "pause" repmgrd on all nodes wth a single command ("repmgr daemon pause")
which notifies repmgrd not to take any failover action until the node
is "unpaused" ("repmgr daemon unpause").

"repmgr daemon status" provides an overview of each node and whether repmgrd
is running, and if so whether it is paused.

"repmgr standby switchover" has been modified to automatically pause repmgrd
while carrying out the switchover.

See documentation for further details.
2018-09-27 16:42:10 +09:00
Ian Barwick
08ab6290c1 Add dummy 4.2 extension SQL file 2018-08-14 09:54:27 +09:00
Ian Barwick
c236405251 Update extension metadata for 4.1 release
This release does not make any changes to the extension database
objects.
2018-07-24 09:56:43 +09:00
Ian Barwick
b8b991398a Escape double-quotes in strings passed to an event notification script
The string in question will be generated internally by repmgr as a simple
one-line string with no control characters etc., so all that needs to be
escaped at the moment are any double quotes.
2017-11-16 10:36:48 +09:00
Ian Barwick
7fffe3ed96 witness: initial code framework 2017-11-15 13:47:41 +09:00
Ian Barwick
d8c2f66c5b Initial SGML documentation support 2017-10-05 10:29:24 +09:00
Marco Nenciarini
dd9352a777 Fix executables installation in PostgreSQL 9.3 2017-10-04 09:36:20 +09:00
Ian Barwick
3bc38631cf Update Makefile 2017-10-04 09:36:16 +09:00
Ian Barwick
8f031d3c20 Add "includedir_internal" to "PG_CPPFLAGS" 2017-09-19 22:19:04 +09:00
Ian Barwick
34fb09cae4 Add placeholder test 2017-09-18 21:55:23 +09:00
Ian Barwick
5a3c26a0b8 Makefile: better fix for SCRIPTS_built and 9.4 2017-09-17 07:42:58 +09:00
Ian Barwick
621ca352df Dynamically generate "repmgr_version.h" 2017-09-12 12:02:26 +09:00
Ian Barwick
72e037d55b SCRIPTS_built also required for 9.4 2017-09-02 12:03:17 +09:00
Ian Barwick
4ba3e67e11 Hacky workaround for hacky workaround in 9.4
For some reason 9.4 doesn't install the repmgr/repmgrd binaries
with "SCRIPTS_built". "SCRIPTS" seems to work for both 9.4 and
later versions.
2017-09-02 11:54:07 +09:00
Ian Barwick
5e019a65e7 Initial upgrade SQL for repmgr3 to repmgr4 2017-08-17 21:14:55 +09:00
Ian Barwick
5948cf6cda repmgr standby switchover: add sanity check for pg_rewind useability
pg_rewind will only be executed on a demoted primary if explictly
requested, to prevent transactions on the primary, which
were never replicated, from being automatically overwritten.

If --force-rewind is provided, we'll need to check pg_rewind
is actually useable before we need to use it.
2017-08-04 00:45:55 +09:00
Ian Barwick
fbe74cbee4 Rename repmgr{d}4 binaries to repmgr{d}
This was useful during initial development but now no longer required.
2017-07-31 10:37:15 +09:00
Ian Barwick
8a2e4db1bc Add "repmgr node status"
Outputs an overview of a node's status, and emits warnings if any
issues detected.
2017-07-25 00:39:04 +09:00
Ian Barwick
a29bc3e0fa Rename config.[ch] to configfile.[ch] 2017-07-16 09:41:26 +09:00
Ian Barwick
d77e8d4d22 repmgrd: split physical and BDR functionality into separate files 2017-07-13 17:21:29 +09:00
Ian Barwick
71a0871232 Add "repmgr bdr register" 2017-07-11 15:38:58 +09:00
Ian Barwick
46c956e61a Use "primary" instead of "master" 2017-06-23 21:33:54 +09:00
Ian Barwick
bfa6f6709d repmgrd: add --help output and update Makefile 2017-06-12 09:11:32 +09:00
Ian Barwick
4c5f065ef2 Check data directory not used by an active instance before cloning
This involves adding some infrastructure to parse pg_control in a
reasonably version-independent fashion. This will probably be useful
in other contexts where we need to verify the status of a
data directory where the instance isn't running.
2017-05-12 08:46:49 +09:00
Ian Barwick
611e3b5e29 Further "standby clone" code 2017-05-01 23:34:01 +09:00
Ian Barwick
dc347f1484 Additional "standby clone" code
We'll break up the unwieldy "do_standby_clone()" function into discrete
unit for easier maintenance.
2017-04-28 22:00:26 +09:00
Ian Barwick
99e7bb0ea3 Initial code for standby clone 2017-04-27 09:22:09 +09:00
Ian Barwick
bcf55b4f72 Split "action" functions to individual files
repmgr3's repmgr.c file was not far off 10,000 lines - this will make
it easier to manage individual parts of the code.
2017-04-26 22:58:21 +09:00
Ian Barwick
1b785d9a20 Add simple output for CLUSTER EVENT 2017-04-26 10:31:56 +09:00
Ian Barwick
001d887e8d Initial database functions 2017-04-21 15:12:33 +09:00
Ian Barwick
8968cfe735 Add logging and repmgr command sanity checks 2017-04-20 00:32:04 +09:00
Ian Barwick
1631917715 Initial table definitions and coding for repmgr client utility 2017-04-19 22:41:20 +09:00
Ian Barwick
e306eb213b Tweak extension configuration 2017-04-19 10:12:26 +09:00
Ian Barwick
856244fdd6 Suffix binaries with "4" ("repmgr4" etc)
So we can use the existing repmgr in parallel for development
2017-04-18 12:25:25 +09:00
Ian Barwick
e6237cc81a Makefiles and placeholder code 2017-04-18 11:26:51 +09:00