mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
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.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -42,8 +42,6 @@ lib*.pc
|
||||
/regression.diffs
|
||||
/regression.out
|
||||
|
||||
/doc/Makefile
|
||||
|
||||
# other
|
||||
/.lineno
|
||||
*.dSYM
|
||||
|
||||
@@ -77,12 +77,6 @@ Makefile: Makefile.in config.status configure
|
||||
Makefile.global: Makefile.global.in config.status configure
|
||||
./config.status $@
|
||||
|
||||
doc:
|
||||
$(MAKE) -C doc all
|
||||
|
||||
install-doc:
|
||||
$(MAKE) -C doc install
|
||||
|
||||
clean: additional-clean
|
||||
|
||||
maintainer-clean: additional-maintainer-clean
|
||||
@@ -91,7 +85,6 @@ additional-clean:
|
||||
rm -f *.o
|
||||
|
||||
additional-maintainer-clean: clean
|
||||
$(MAKE) -C doc maintainer-clean
|
||||
rm -f config.status config.log
|
||||
rm -f config.h
|
||||
rm -f repmgr_version.h
|
||||
|
||||
21
configure
vendored
21
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.69 for repmgr 4.3.
|
||||
# Generated by GNU Autoconf 2.69 for repmgr 4.4.
|
||||
#
|
||||
# Report bugs to <repmgr@googlegroups.com>.
|
||||
#
|
||||
@@ -582,8 +582,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='repmgr'
|
||||
PACKAGE_TARNAME='repmgr'
|
||||
PACKAGE_VERSION='4.3'
|
||||
PACKAGE_STRING='repmgr 4.3'
|
||||
PACKAGE_VERSION='4.4'
|
||||
PACKAGE_STRING='repmgr 4.4'
|
||||
PACKAGE_BUGREPORT='repmgr@googlegroups.com'
|
||||
PACKAGE_URL='https://repmgr.org/'
|
||||
|
||||
@@ -1178,7 +1178,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures repmgr 4.3 to adapt to many kinds of systems.
|
||||
\`configure' configures repmgr 4.4 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1239,7 +1239,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of repmgr 4.3:";;
|
||||
short | recursive ) echo "Configuration of repmgr 4.4:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1313,7 +1313,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
repmgr configure 4.3
|
||||
repmgr configure 4.4
|
||||
generated by GNU Autoconf 2.69
|
||||
|
||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
@@ -1332,7 +1332,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by repmgr $as_me 4.3, which was
|
||||
It was created by repmgr $as_me 4.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ $0 $@
|
||||
@@ -1851,8 +1851,6 @@ ac_config_files="$ac_config_files Makefile"
|
||||
|
||||
ac_config_files="$ac_config_files Makefile.global"
|
||||
|
||||
ac_config_files="$ac_config_files doc/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
# tests run on this system so they can be shared between configure
|
||||
@@ -2359,7 +2357,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by repmgr $as_me 4.3, which was
|
||||
This file was extended by repmgr $as_me 4.4, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -2422,7 +2420,7 @@ _ACEOF
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||
ac_cs_version="\\
|
||||
repmgr config.status 4.3
|
||||
repmgr config.status 4.4
|
||||
configured by $0, generated by GNU Autoconf 2.69,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
@@ -2546,7 +2544,6 @@ do
|
||||
"config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
|
||||
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
||||
@@ -59,6 +59,5 @@ AC_SUBST(vpath_build)
|
||||
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_CONFIG_FILES([Makefile.global])
|
||||
AC_CONFIG_FILES([doc/Makefile])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
61
doc/Makefile
Normal file
61
doc/Makefile
Normal file
@@ -0,0 +1,61 @@
|
||||
# Make "html" the default target, since that is what most people tend
|
||||
# to want to use.
|
||||
html:
|
||||
|
||||
all: html
|
||||
|
||||
subdir = doc
|
||||
repmgr_top_builddir = ..
|
||||
include $(repmgr_top_builddir)/Makefile.global
|
||||
|
||||
XMLINCLUDE = --path .
|
||||
|
||||
ifndef XMLLINT
|
||||
XMLLINT = $(missing) xmllint
|
||||
endif
|
||||
|
||||
ifndef XSLTPROC
|
||||
XSLTPROC = $(missing) xsltproc
|
||||
endif
|
||||
|
||||
override XSLTPROCFLAGS += --stringparam repmgr.version '$(REPMGR_VERSION)'
|
||||
|
||||
ALLSGML := $(wildcard $(srcdir)/*.sgml)
|
||||
GENERATED_SGML = version.sgml
|
||||
|
||||
##
|
||||
## HTML
|
||||
##
|
||||
|
||||
|
||||
html: html-stamp
|
||||
|
||||
html-stamp: stylesheet.xsl repmgr.sgml $(ALLSGML) $(GENERATED_SGML)
|
||||
$(XMLLINT) $(XMLINCLUDE) --noout --valid $(word 2,$^)
|
||||
$(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_HTML_FLAGS) $(wordlist 1,2,$^)
|
||||
cp $(srcdir)/stylesheet.css html/
|
||||
touch $@
|
||||
|
||||
version.sgml: $(repmgr_top_builddir)/repmgr_version.h
|
||||
{ \
|
||||
echo "<!ENTITY repmgrversion \"$(REPMGR_VERSION)\">"; \
|
||||
} > $@
|
||||
|
||||
zip: html
|
||||
cp -r html repmgr-docs-$(REPMGR_VERSION)
|
||||
zip -r repmgr-docs-$(REPMGR_VERSION).zip repmgr-docs-$(REPMGR_VERSION)
|
||||
rm -rf repmgr-docs-$(REPMGR_VERSION)
|
||||
|
||||
install: html
|
||||
@$(MKDIR_P) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
@$(INSTALL_DATA) $(wildcard html/*.html) $(wildcard html/*.css) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
@echo Installed docs to $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
|
||||
clean:
|
||||
rm -f html-stamp
|
||||
rm -f HTML.index $(GENERATED_SGML)
|
||||
|
||||
maintainer-clean:
|
||||
rm -rf html
|
||||
|
||||
.PHONY: html
|
||||
@@ -1,76 +0,0 @@
|
||||
repmgr_subdir = doc
|
||||
repmgr_top_builddir = ..
|
||||
include $(repmgr_top_builddir)/Makefile.global
|
||||
|
||||
ifndef JADE
|
||||
JADE = $(missing) jade
|
||||
endif
|
||||
|
||||
SGMLINCLUDE = -D . -D ${srcdir}
|
||||
|
||||
SPFLAGS += -wall -wno-unused-param -wno-empty -wfully-tagged
|
||||
|
||||
JADE.html.call = $(JADE) $(JADEFLAGS) $(SPFLAGS) $(SGMLINCLUDE) $(CATALOG) -t sgml -i output-html
|
||||
|
||||
ALLSGML := $(wildcard $(srcdir)/*.sgml)
|
||||
# to build bookindex
|
||||
ALMOSTALLSGML := $(filter-out %bookindex.sgml,$(ALLSGML))
|
||||
GENERATED_SGML = version.sgml bookindex.sgml
|
||||
|
||||
Makefile: Makefile.in
|
||||
cd $(repmgr_top_builddir) && ./config.status doc/Makefile
|
||||
|
||||
all: html
|
||||
|
||||
html: html-stamp
|
||||
|
||||
html-stamp: repmgr.sgml $(ALLSGML) $(GENERATED_SGML) stylesheet.dsl website-docs.css
|
||||
$(MKDIR_P) html
|
||||
$(JADE.html.call) -d stylesheet.dsl -i include-index $<
|
||||
cp $(srcdir)/stylesheet.css $(srcdir)/website-docs.css html/
|
||||
touch $@
|
||||
|
||||
repmgr.html: repmgr.sgml $(ALLSGML) $(GENERATED_SGML) stylesheet.dsl website-docs.css
|
||||
sed '/html-index-filename/a\
|
||||
(define nochunks #t)' <stylesheet.dsl >nochunks.dsl
|
||||
$(JADE.html.call) -d nochunks.dsl -i include-index $< >repmgr.html
|
||||
|
||||
version.sgml: ${repmgr_top_builddir}/repmgr_version.h
|
||||
{ \
|
||||
echo "<!ENTITY repmgrversion \"$(REPMGR_VERSION)\">"; \
|
||||
} > $@
|
||||
|
||||
HTML.index: repmgr.sgml $(ALMOSTALLSGML) stylesheet.dsl
|
||||
@$(MKDIR_P) html
|
||||
$(JADE.html.call) -d stylesheet.dsl -V html-index $<
|
||||
|
||||
website-docs.css:
|
||||
@$(MKDIR_P) html
|
||||
curl http://www.postgresql.org/media/css/docs.css > ${srcdir}/website-docs.css
|
||||
|
||||
bookindex.sgml: HTML.index
|
||||
ifdef COLLATEINDEX
|
||||
LC_ALL=C $(PERL) $(COLLATEINDEX) -f -g -i 'bookindex' -o $@ $<
|
||||
else
|
||||
@$(missing) collateindex.pl $< $@
|
||||
endif
|
||||
|
||||
clean:
|
||||
rm -f html-stamp
|
||||
rm -f HTML.index $(GENERATED_SGML)
|
||||
|
||||
maintainer-clean:
|
||||
rm -rf html
|
||||
rm -f Makefile
|
||||
|
||||
zip: html
|
||||
cp -r html repmgr-docs-$(REPMGR_VERSION)
|
||||
zip -r repmgr-docs-$(REPMGR_VERSION).zip repmgr-docs-$(REPMGR_VERSION)
|
||||
rm -rf repmgr-docs-$(REPMGR_VERSION)
|
||||
|
||||
install: html
|
||||
@$(MKDIR_P) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
@$(INSTALL_DATA) $(wildcard html/*.html) $(wildcard html/*.css) $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
@echo Installed docs to $(DESTDIR)$(docdir)/$(docmoduledir)/repmgr
|
||||
|
||||
.PHONY: html all
|
||||
@@ -1,9 +1,10 @@
|
||||
<appendix id="appendix-faq" xreflabel="FAQ">
|
||||
<indexterm>
|
||||
<primary>FAQ (Frequently Asked Questions)</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>FAQ (Frequently Asked Questions)</title>
|
||||
<title>FAQ (Frequently Asked Questions)</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>FAQ (Frequently Asked Questions)</primary>
|
||||
</indexterm>
|
||||
|
||||
<sect1 id="faq-general" xreflabel="General">
|
||||
<title>General</title>
|
||||
@@ -125,7 +126,7 @@
|
||||
<sect2 id="faq-old-packages">
|
||||
<title>How can I obtain old versions of &repmgr; packages?</title>
|
||||
<para>
|
||||
See appendix <xref linkend="packages-old-versions"> for details.
|
||||
See appendix <xref linkend="packages-old-versions"/> for details.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
@@ -251,8 +252,8 @@
|
||||
</para>
|
||||
<para>
|
||||
&repmgr; provides the command <command>repmgr node rejoin</command> which can
|
||||
optionally execute <command>pg_rewind</command>; see the <xref linkend="repmgr-node-rejoin">
|
||||
documentation for details, in particular the section <xref linkend="repmgr-node-rejoin-pg-rewind">.
|
||||
optionally execute <command>pg_rewind</command>; see the <xref linkend="repmgr-node-rejoin"/>
|
||||
documentation for details, in particular the section <xref linkend="repmgr-node-rejoin-pg-rewind"/>.
|
||||
</para>
|
||||
<para>
|
||||
If <command>pg_rewind</command> cannot be used, then the data directory will need
|
||||
@@ -276,7 +277,7 @@
|
||||
directory in <filename>/etc</filename>?</title>
|
||||
<para>
|
||||
Use the command line option <literal>--copy-external-config-files</literal>. For more details
|
||||
see <xref linkend="repmgr-standby-clone-config-file-copying">.
|
||||
see <xref linkend="repmgr-standby-clone-config-file-copying"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
@@ -317,7 +318,7 @@
|
||||
<para>
|
||||
Provide the option <literal>--waldir</literal> (<literal>--xlogdir</literal> in PostgreSQL 9.6
|
||||
and earlier) with the absolute path to the WAL directory in <varname>pg_basebackup_options</varname>.
|
||||
For more details see <xref linkend="cloning-advanced-pg-basebackup-options">.
|
||||
For more details see <xref linkend="cloning-advanced-pg-basebackup-options"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
@@ -387,7 +388,7 @@
|
||||
<sect2 id="faq-repmgrd-logfile-rotate" xreflabel="repmgrd logfile rotation">
|
||||
<title>How can I get &repmgrd; to rotate its logfile?</title>
|
||||
<para>
|
||||
Configure your system's <literal>logrotate</literal> service to do this; see <xref linkend="repmgrd-log-rotation">.
|
||||
Configure your system's <literal>logrotate</literal> service to do this; see <xref linkend="repmgrd-log-rotation"/>.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
@@ -410,7 +411,7 @@
|
||||
<para>
|
||||
<varname>promote_command</varname> or <varname>follow_command</varname> can be user-defined scripts,
|
||||
so &repmgr; will not apply <option>pg_bindir</option> even if excuting &repmgr;. Always provide the full
|
||||
path; see <xref linkend="repmgrd-automatic-failover-configuration"> for more details.
|
||||
path; see <xref linkend="repmgrd-automatic-failover-configuration"/> for more details.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<appendix id="appendix-packages" xreflabel="Package details">
|
||||
|
||||
<title>&repmgr; package details</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>packages</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>&repmgr; package details</title>
|
||||
<para>
|
||||
This section provides technical details about various &repmgr; binary
|
||||
packages, such as location of the installed binaries and
|
||||
@@ -309,7 +311,7 @@
|
||||
version number for your installation.
|
||||
</para>
|
||||
<para>
|
||||
See also <xref linkend="repmgrd-configuration-debian-ubuntu"> for some specifics related
|
||||
See also <xref linkend="repmgrd-configuration-debian-ubuntu"/> for some specifics related
|
||||
to configuring the &repmgrd; daemon.
|
||||
</para>
|
||||
|
||||
@@ -508,7 +510,7 @@ repmgr96-4.1.1-0.0git320.g5113ab0.1.el7.x86_64.rpm</programlisting>
|
||||
Old versions can be located with e.g.:
|
||||
<programlisting>
|
||||
yum --showduplicates list repmgr96</programlisting>
|
||||
(substitute the appropriate package name; see <xref linkend="packages-centos">) and installed with:
|
||||
(substitute the appropriate package name; see <xref linkend="packages-centos"/>) and installed with:
|
||||
<programlisting>
|
||||
yum install {package_name}-{version}</programlisting>
|
||||
where <literal>{package_name}</literal> is the base package name (e.g. <literal>repmgr96</literal>)
|
||||
@@ -546,7 +548,7 @@ repmgr96-4.1.1-0.0git320.g5113ab0.1.el7.x86_64.rpm</programlisting>
|
||||
char package_conf_file[MAXPGPATH] = "";</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
See also: <xref linkend="configuration-file">
|
||||
See also: <xref linkend="configuration-file"/>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -560,7 +562,7 @@ repmgr96-4.1.1-0.0git320.g5113ab0.1.el7.x86_64.rpm</programlisting>
|
||||
char package_pid_file[MAXPGPATH] = "";</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
See also: <xref linkend="repmgrd-pid-file">
|
||||
See also: <xref linkend="repmgrd-pid-file"/>
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
See also: <xref linkend="upgrading-repmgr">
|
||||
See also: <xref linkend="upgrading-repmgr"/>
|
||||
</para>
|
||||
|
||||
<sect1 id="release-4.4">
|
||||
@@ -627,7 +627,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
We recommend upgrading to this version as soon as possible.
|
||||
This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.1.0;
|
||||
&repmgrd; (if running) should be restarted.
|
||||
See <xref linkend="upgrading-repmgr"> for more details.
|
||||
See <xref linkend="upgrading-repmgr"/> for more details.
|
||||
</para>
|
||||
|
||||
<sect2>
|
||||
@@ -802,7 +802,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
for this release (unless upgrading from repmgr 3.x).
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="upgrading-repmgr-extension"> for more details.
|
||||
See <xref linkend="upgrading-repmgr-extension"/> for more details.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
@@ -817,7 +817,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Coinciding with this release, the 2ndQuadrant repository structure has changed.
|
||||
See section <xref linkend="installation-packages"> for details, particularly
|
||||
See section <xref linkend="installation-packages"/> for details, particularly
|
||||
if you are using a RPM-based system.
|
||||
</para>
|
||||
</note>
|
||||
@@ -830,7 +830,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Default for <xref linkend="repmgr-conf-log-level"> is now <option>INFO</option>.
|
||||
Default for <xref linkend="repmgr-conf-log-level"/> is now <option>INFO</option>.
|
||||
This produces additional informative log output, without creating excessive additional
|
||||
log file volume, and matches the setting assumed for examples in the documentation.
|
||||
(GitHub #470).
|
||||
@@ -915,7 +915,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
&repmgrd;: create a PID file by default
|
||||
(GitHub #457). For details, see <xref linkend="repmgrd-pid-file">.
|
||||
(GitHub #457). For details, see <xref linkend="repmgrd-pid-file"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -990,7 +990,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<para>
|
||||
We recommend upgrading to this version as soon as possible.
|
||||
This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.5;
|
||||
&repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr">
|
||||
&repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr"/>
|
||||
for more details.
|
||||
</para>
|
||||
|
||||
@@ -1126,7 +1126,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
Add sanity check if <option>--upstream-node-id</option> not supplied when executing
|
||||
<xref linkend="repmgr-standby-register"> (GitHub #395).
|
||||
<xref linkend="repmgr-standby-register"/> (GitHub #395).
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -1252,7 +1252,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.3;
|
||||
&repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr">
|
||||
&repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr"/>
|
||||
for more details.
|
||||
</para>
|
||||
|
||||
@@ -1639,14 +1639,14 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Fix <xref linkend="repmgr-cluster-show"> when <literal>repmgr</literal> schema not set in search path
|
||||
Fix <xref linkend="repmgr-cluster-show"/> when <literal>repmgr</literal> schema not set in search path
|
||||
(GitHub #341)
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
When using <literal>--force-rewind</literal> with <xref linkend="repmgr-node-rejoin">
|
||||
When using <literal>--force-rewind</literal> with <xref linkend="repmgr-node-rejoin"/>
|
||||
delete any replication slots copied by <application>pg_rewind</application>
|
||||
(GitHub #334)
|
||||
</para>
|
||||
@@ -1702,7 +1702,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
For detailed instructions on upgrading from repmgr 3.x, see <xref linkend="upgrading-from-repmgr-3">.
|
||||
For detailed instructions on upgrading from repmgr 3.x, see <xref linkend="upgrading-from-repmgr-3"/>.
|
||||
</para>
|
||||
|
||||
<sect2>
|
||||
@@ -1716,7 +1716,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
the <command>switchover</command> process has been improved and streamlined,
|
||||
speeding up the switchover process and can also instruct other standbys
|
||||
to follow the new primary once the switchover has completed. See
|
||||
<xref linkend="performing-switchover"> for more details.
|
||||
<xref linkend="performing-switchover"/> for more details.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
@@ -1767,8 +1767,8 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>monitoring and status checks</emphasis>:
|
||||
New commands <xref linkend="repmgr-node-check"> and
|
||||
<xref linkend="repmgr-node-status"> providing information
|
||||
New commands <xref linkend="repmgr-node-check"/> and
|
||||
<xref linkend="repmgr-node-status"/> providing information
|
||||
about a node's status and replication-related monitoring
|
||||
output.
|
||||
</para>
|
||||
@@ -1778,7 +1778,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
<listitem>
|
||||
<para>
|
||||
<emphasis>node rejoin</emphasis>:
|
||||
New commands <xref linkend="repmgr-node-rejoin"> enables a failed
|
||||
New commands <xref linkend="repmgr-node-rejoin"/> enables a failed
|
||||
primary to be rejoined to a replication cluster, optionally using
|
||||
<application>pg_rewind</application> to synchronise its data,
|
||||
(note that <application>pg_rewind</application> may not be useable
|
||||
@@ -1796,7 +1796,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
functioning even if the monitored PostgreSQL instance is down, and resume
|
||||
monitoring if it reappears. Additionally, if the instance's role has changed
|
||||
(typically from a primary to a standby, e.g. following reintegration of a
|
||||
failed primary using <xref linkend="repmgr-node-rejoin">) &repmgrd;
|
||||
failed primary using <xref linkend="repmgr-node-rejoin"/>) &repmgrd;
|
||||
will automatically resume monitoring it as a standby.
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -1860,7 +1860,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
by the configuration file option <varname>replication_user</varname>.
|
||||
The value (which defaults to the user provided in the <varname>conninfo</varname>
|
||||
string) will be stored in the &repmgr; metadata for use by
|
||||
<xref linkend="repmgr-standby-clone"> and <xref linkend="repmgr-standby-follow">.
|
||||
<xref linkend="repmgr-standby-clone"/> and <xref linkend="repmgr-standby-follow"/>.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
@@ -1875,7 +1875,7 @@ REPMGRD_OPTS="--daemonize=false"</programlisting>
|
||||
to <varname>primary_conninfo</varname> by default; to force the inclusion
|
||||
of a password (not recommended), use the new configuration file parameter
|
||||
<varname>use_primary_conninfo_password</varname>. For details, ee section
|
||||
<xref linkend="cloning-advanced-managing-passwords">.
|
||||
<xref linkend="cloning-advanced-managing-passwords"/>.
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<appendix id="appendix-support" xreflabel="repmgr support">
|
||||
|
||||
<title>&repmgr; support</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>support</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>&repmgr; support</title>
|
||||
<para>
|
||||
<ulink url="https://2ndquadrant.com/">2ndQuadrant</ulink> provides 24x7
|
||||
production support for &repmgr; and other PostgreSQL
|
||||
@@ -28,12 +30,13 @@
|
||||
</important>
|
||||
|
||||
<sect1 id="appendix-support-reporting-issues" xreflabel="Reportins Issues">
|
||||
<title>Reporting Issues</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>support</primary>
|
||||
<secondary>reporting issues</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Reporting Issues</title>
|
||||
|
||||
<para>
|
||||
When asking questions or reporting issues, it is extremely helpful if the following information is included:
|
||||
@@ -48,7 +51,7 @@
|
||||
|
||||
<listitem>
|
||||
<simpara>
|
||||
How was &repmgr installed? From source? From packages? If
|
||||
How was &repmgr; installed? From source? From packages? If
|
||||
so from which repository?
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<title>Cloning standbys</title>
|
||||
|
||||
<sect1 id="cloning-from-barman" xreflabel="Cloning from Barman">
|
||||
<title>Cloning a standby from Barman</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>cloning</primary>
|
||||
<secondary>from Barman</secondary>
|
||||
@@ -11,9 +13,8 @@
|
||||
<secondary>cloning a standby</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Cloning a standby from Barman</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-standby-clone"> can use
|
||||
<xref linkend="repmgr-standby-clone"/> can use
|
||||
<ulink url="https://www.2ndquadrant.com/">2ndQuadrant</ulink>'s
|
||||
<ulink url="https://www.pgbarman.org/">Barman</ulink> application
|
||||
to clone a standby (and also as a fallback source for WAL files).
|
||||
@@ -73,7 +74,7 @@
|
||||
<para>
|
||||
the <varname>restore_command</varname> setting in <filename>repmgr.conf</filename> is configured to
|
||||
use a copy of the <command>barman-wal-restore</command> script shipped with the
|
||||
<literal>barman-cli</literal> package (see section <xref linkend="cloning-from-barman-restore-command">
|
||||
<literal>barman-cli</literal> package (see section <xref linkend="cloning-from-barman-restore-command"/>
|
||||
below).
|
||||
</para>
|
||||
</listitem>
|
||||
@@ -126,12 +127,13 @@
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 id="cloning-from-barman-restore-command" xreflabel="Using Barman as a WAL file source">
|
||||
<indexterm>
|
||||
<title>Using Barman as a WAL file source</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>Barman</primary>
|
||||
<secondary>fetching archived WAL</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Using Barman as a WAL file source</title>
|
||||
<para>
|
||||
As a fallback in case streaming replication is interrupted, PostgreSQL can optionally
|
||||
retrieve WAL files from an archive, such as that provided by Barman. This is done by
|
||||
@@ -172,7 +174,9 @@
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="cloning-replication-slots" xreflabel="Cloning and replication slots">
|
||||
<sect1 id="cloning-replication-slots" xreflabel="Cloning and replication slots">
|
||||
<title>Cloning and replication slots</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>cloning</primary>
|
||||
<secondary>replication slots</secondary>
|
||||
@@ -182,7 +186,6 @@
|
||||
<primary>replication slots</primary>
|
||||
<secondary>cloning</secondary>
|
||||
</indexterm>
|
||||
<title>Cloning and replication slots</title>
|
||||
<para>
|
||||
Replication slots were introduced with PostgreSQL 9.4 and are designed to ensure
|
||||
that any standby connected to the primary using a replication slot will always
|
||||
@@ -244,18 +247,20 @@
|
||||
<simpara>
|
||||
As an alternative we recommend using 2ndQuadrant's <ulink url="https://www.pgbarman.org/">Barman</ulink>,
|
||||
which offloads WAL management to a separate server, removing the requirement to use a replication
|
||||
slot for each individual standby to reserve WAL. See section <xref linkend="cloning-from-barman">
|
||||
slot for each individual standby to reserve WAL. See section <xref linkend="cloning-from-barman"/>
|
||||
for more details on using &repmgr; together with Barman.
|
||||
</simpara>
|
||||
</tip>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="cloning-cascading" xreflabel="Cloning and cascading replication">
|
||||
<title>Cloning and cascading replication</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>cloning</primary>
|
||||
<secondary>cascading replication</secondary>
|
||||
</indexterm>
|
||||
<title>Cloning and cascading replication</title>
|
||||
|
||||
<para>
|
||||
Cascading replication, introduced with PostgreSQL 9.2, enables a standby server
|
||||
to replicate from another standby server rather than directly from the primary,
|
||||
@@ -276,7 +281,7 @@
|
||||
</para>
|
||||
<para>
|
||||
To demonstrate cascading replication, first ensure you have a primary and standby
|
||||
set up as shown in the <xref linkend="quickstart">.
|
||||
set up as shown in the <xref linkend="quickstart"/>.
|
||||
Then create an additional standby server with <filename>repmgr.conf</filename> looking
|
||||
like this:
|
||||
<programlisting>
|
||||
@@ -339,11 +344,11 @@
|
||||
</sect1>
|
||||
|
||||
<sect1 id="cloning-advanced" xreflabel="Advanced cloning options">
|
||||
<title>Advanced cloning options</title>
|
||||
<indexterm>
|
||||
<primary>cloning</primary>
|
||||
<secondary>advanced options</secondary>
|
||||
</indexterm>
|
||||
<title>Advanced cloning options</title>
|
||||
|
||||
<sect2 id="cloning-advanced-pg-basebackup-options" xreflabel="pg_basebackup options when cloning a standby">
|
||||
<title>pg_basebackup options when cloning a standby</title>
|
||||
@@ -365,7 +370,7 @@
|
||||
<simpara>
|
||||
If <application>Barman</application> is set up for the cluster, it's possible to
|
||||
clone the standby directly from Barman, without any impact on the server the standby
|
||||
is being cloned from. For more details see <xref linkend="cloning-from-barman">.
|
||||
is being cloned from. For more details see <xref linkend="cloning-from-barman"/>.
|
||||
</simpara>
|
||||
</tip>
|
||||
<para>
|
||||
@@ -433,7 +438,7 @@
|
||||
(but not <filename>~/.pgpass</filename>) and place it into the <varname>primary_conninfo</varname>
|
||||
string in <filename>recovery.conf</filename>. Note that <varname>PGPASSWORD</varname>
|
||||
will need to be set during any action which causes <filename>recovery.conf</filename> to be
|
||||
rewritten, e.g. <xref linkend="repmgr-standby-follow">.
|
||||
rewritten, e.g. <xref linkend="repmgr-standby-follow"/>.
|
||||
</para>
|
||||
<para>
|
||||
It is of course also possible to include the password value in the <varname>conninfo</varname>
|
||||
@@ -460,7 +465,7 @@
|
||||
replication connections and generating <filename>recovery.conf</filename>. This
|
||||
value will also be stored in the parameter <literal>repmgr.nodes</literal>
|
||||
table for each node; it no longer needs to be explicitly specified when
|
||||
cloning a node or executing <xref linkend="repmgr-standby-follow">.
|
||||
cloning a node or executing <xref linkend="repmgr-standby-follow"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<sect1 id="configuration-file-log-settings" xreflabel="log settings">
|
||||
<title>Log settings</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
<secondary>log settings</secondary>
|
||||
@@ -7,7 +9,6 @@
|
||||
<primary>log settings</primary>
|
||||
<secondary>configuration in repmgr.conf</secondary>
|
||||
</indexterm>
|
||||
<title>Log settings</title>
|
||||
|
||||
<para>
|
||||
By default, &repmgr; and &repmgrd; write log output to
|
||||
@@ -32,12 +33,11 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry id="repmgr-conf-log-level" xreflabel="log_level">
|
||||
<term><varname>log_level</varname> (<type>string</type>)
|
||||
<term><varname>log_level</varname> (<type>string</type>)</term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary><varname>log_level</varname> configuration file parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
One of <option>DEBUG</option>, <option>INFO</option>, <option>NOTICE</option>,
|
||||
<option>WARNING</option>, <option>ERROR</option>, <option>ALERT</option>, <option>CRIT</option>
|
||||
@@ -76,11 +76,11 @@
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
If <xref linkend="repmgr-conf-log-facility"> is set to <option>STDERR</option>, log output
|
||||
If <xref linkend="repmgr-conf-log-facility"/> is set to <option>STDERR</option>, log output
|
||||
can be redirected to the specified file.
|
||||
</para>
|
||||
<para>
|
||||
See <xref linkend="repmgrd-log-rotation"> for information on configuring log rotation.
|
||||
See <xref linkend="repmgrd-log-rotation"/> for information on configuring log rotation.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<sect1 id="configuration-file-settings" xreflabel="required configuration file settings">
|
||||
|
||||
<title>Required configuration file settings</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
<secondary>required settings</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Required configuration file settings</title>
|
||||
<para>
|
||||
Each <filename>repmgr.conf</filename> file must contain the following parameters:
|
||||
</para>
|
||||
@@ -60,7 +62,7 @@
|
||||
</para>
|
||||
<para>
|
||||
For details on conninfo strings, see section <ulink
|
||||
url="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING">Connection Strings</>
|
||||
url="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING">Connection Strings</ulink>
|
||||
in the PosgreSQL documentation.
|
||||
</para>
|
||||
<para>
|
||||
@@ -69,18 +71,18 @@
|
||||
string to determine the length of time which elapses before a network
|
||||
connection attempt is abandoned; for details see <ulink
|
||||
url="https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-CONNECT-TIMEOUT">
|
||||
the PostgreSQL documentation</>.
|
||||
the PostgreSQL documentation</ulink>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="repmgr-conf-data-directory" xreflabel="data_directory">
|
||||
<term><varname>data_directory</varname> (<type>string</type>)
|
||||
<indexterm>
|
||||
<primary><varname>data_directory</varname> configuration file parameter</primary>
|
||||
</indexterm>
|
||||
</term>
|
||||
<term><varname>data_directory</varname> (<type>string</type>)</term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary><varname>data_directory</varname> configuration file parameter</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The node's data directory. This is needed by repmgr
|
||||
when performing operations when the PostgreSQL instance
|
||||
@@ -99,7 +101,7 @@
|
||||
<ulink url="https://raw.githubusercontent.com/2ndQuadrant/repmgr/master/repmgr.conf.sample">repmgr.conf.sample</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
For &repmgrd;-specific settings, see <xref linkend="repmgrd-configuration">.
|
||||
For &repmgrd;-specific settings, see <xref linkend="repmgrd-configuration"/>.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<sect1 id="configuration-file-service-commands" xreflabel="service command settings">
|
||||
<title>Service command settings</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
<secondary>service command settings</secondary>
|
||||
@@ -7,7 +9,6 @@
|
||||
<primary>service command settings</primary>
|
||||
<secondary>configuration in repmgr.conf</secondary>
|
||||
</indexterm>
|
||||
<title>Service command settings</title>
|
||||
|
||||
<para>
|
||||
In some circumstances, &repmgr; (and &repmgrd;) need to
|
||||
@@ -68,7 +69,7 @@
|
||||
</para>
|
||||
<para>
|
||||
Do not confuse this with <varname>promote_command</varname>, which is used
|
||||
by &repmgrd; to execute <xref linkend="repmgr-standby-promote">.
|
||||
by &repmgrd; to execute <xref linkend="repmgr-standby-promote"/>.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
<sect1 id="configuration-file" xreflabel="configuration file">
|
||||
|
||||
<title>Configuration file</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
</indexterm>
|
||||
@@ -8,8 +11,6 @@
|
||||
<secondary>repmgr.conf</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Configuration file</title>
|
||||
|
||||
<para>
|
||||
<application>repmgr</application> and &repmgrd;
|
||||
use a common configuration file, by default called
|
||||
@@ -17,19 +18,19 @@
|
||||
<filename>repmgr.conf</filename> must contain a number of required parameters, including
|
||||
the database connection string for the local node and the location
|
||||
of its data directory; other values will be inferred from defaults if
|
||||
not explicitly supplied. See section <xref linkend="configuration-file-settings">
|
||||
not explicitly supplied. See section <xref linkend="configuration-file-settings"/>
|
||||
for more details.
|
||||
</para>
|
||||
|
||||
<sect2 id="configuration-file-format" xreflabel="configuration file format">
|
||||
|
||||
<title>Configuration file format</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
<secondary>format</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Configuration file format</title>
|
||||
|
||||
<para>
|
||||
<filename>repmgr.conf</filename> is a plain text file with one parameter/value
|
||||
combination per line.
|
||||
@@ -63,12 +64,13 @@ data_directory = /var/lib/pgsql/11/data</programlisting>
|
||||
|
||||
|
||||
<sect2 id="configuration-file-location" xreflabel="configuration file location">
|
||||
<title>Configuration file location</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr.conf</primary>
|
||||
<secondary>location</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Configuration file location</title>
|
||||
|
||||
<para>
|
||||
The configuration file will be searched for in the following locations:
|
||||
@@ -105,10 +107,10 @@ data_directory = /var/lib/pgsql/11/data</programlisting>
|
||||
<note>
|
||||
<para>
|
||||
If providing the configuration file location with <literal>-f/--config-file</literal>,
|
||||
avoid using a relative path, particularly when executing <xref linkend="repmgr-primary-register">
|
||||
and <xref linkend="repmgr-standby-register">, as &repmgr; stores the configuration file location
|
||||
avoid using a relative path, particularly when executing <xref linkend="repmgr-primary-register"/>
|
||||
and <xref linkend="repmgr-standby-register"/>, as &repmgr; stores the configuration file location
|
||||
in the repmgr metadata for use when &repmgr; is executed remotely (e.g. during
|
||||
<xref linkend="repmgr-standby-switchover">). &repmgr; will attempt to convert the
|
||||
<xref linkend="repmgr-standby-switchover"/>). &repmgr; will attempt to convert the
|
||||
a relative path into an absolute one, but this may not be the same as the path you
|
||||
would explicitly provide (e.g. <filename>./repmgr.conf</filename> might be converted
|
||||
to <filename>/path/to/./repmgr.conf</filename>, whereas you'd normally write
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
<title>repmgr configuration</title>
|
||||
|
||||
<sect1 id="configuration-prerequisites" xreflabel="Prerequisites for configuration">
|
||||
<title>Prerequisites for configuration</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>configuration</primary>
|
||||
<secondary>prerequisites</secondary>
|
||||
@@ -12,7 +14,6 @@
|
||||
<secondary>ssh</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Prerequisites for configuration</title>
|
||||
<para>
|
||||
Following software must be installed on both servers:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
@@ -62,6 +63,8 @@
|
||||
</tip>
|
||||
|
||||
<sect2 id="configuration-postgresql" xreflabel="PostgreSQL configuration">
|
||||
<title>PostgreSQL configuration for &repmgr;</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>configuration</primary>
|
||||
<secondary>PostgreSQL</secondary>
|
||||
@@ -71,7 +74,6 @@
|
||||
<primary>PostgreSQL configuration</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>PostgreSQL configuration for &repmgr;</title>
|
||||
<para>
|
||||
The following PostgreSQL configuration parameters may need to be changed in order
|
||||
for &repmgr; (and replication itself) to function correctly.
|
||||
@@ -81,13 +83,14 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>hot_standby</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>hot_standby</option></term>
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>hot_standby</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<option>hot_standby</option> must always be set to <literal>on</literal>, as &repmgr; needs
|
||||
to be able to connect to each server it manages.
|
||||
@@ -104,13 +107,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>wal_level</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>wal_level</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>wal_level</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<option>wal_level</option> must be one of <option>replica</option> or <option>logical</option>
|
||||
(PostgreSQL 9.5 and earlier: one of <option>hot_standby</option> or <option>logical</option>).
|
||||
@@ -123,13 +128,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>max_wal_senders</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>max_wal_senders</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>max_wal_senders</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<option>max_wal_senders</option> must be set to a value of <literal>2</literal> or greater.
|
||||
In general you will need one WAL sender for each standby which will attach to the PostgreSQL
|
||||
@@ -149,13 +156,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>max_replication_slots</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>max_replication_slots</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>max_replication_slots</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If you are intending to use replication slots, <option>max_replication_slots</option>
|
||||
must be set to a non-zero value.
|
||||
@@ -174,19 +183,20 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>wal_log_hints</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>wal_log_hints</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>wal_log_hints</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<para>If you are intending to use <application>pg_rewind</application>,
|
||||
and the cluster was not initialised using data checksums, you may want to consider enabling
|
||||
<option>wal_log_hints</option>.
|
||||
</para>
|
||||
<para>
|
||||
For more details see <xref linkend="repmgr-node-rejoin-pg-rewind">.
|
||||
For more details see <xref linkend="repmgr-node-rejoin-pg-rewind"/>.
|
||||
</para>
|
||||
<para>
|
||||
PostgreSQL documentation: <ulink url="https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-WAL-LOG-HINTS">wal_log_hints</ulink>.
|
||||
@@ -196,13 +206,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>archive_mode</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>archive_mode</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>archive_mode</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
We suggest setting <option>archive_mode</option> to <literal>on</literal> (and
|
||||
<option>archive_command</option> to <literal>/bin/true</literal>; see below)
|
||||
@@ -225,13 +237,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>archive_command</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>archive_command</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>archive_command</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If you have set <option>archive_mode</option> to <literal>on</literal> but are not currently planning
|
||||
to use WAL file archiving, set <option>archive_command</option> to a command which does nothing but returns
|
||||
@@ -246,13 +260,15 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>wal_keep_segments</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>wal_keep_segments</option></term>
|
||||
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>wal_keep_segments</primary>
|
||||
<secondary>PostgreSQL configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
Normally there is no need to set <option>wal_keep_segments</option> (default: <literal>0</literal>), as it
|
||||
is <emphasis>not</emphasis> a reliable way of ensuring that all required WAL segments are available to standbys.
|
||||
@@ -293,12 +309,13 @@
|
||||
&configuration-file-service-commands;
|
||||
|
||||
<sect1 id="configuration-permissions" xreflabel="Database user permissions">
|
||||
<title>repmgr database user permissions</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>configuration</primary>
|
||||
<secondary>database user permissions</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgr database user permissions</title>
|
||||
<para>
|
||||
&repmgr; will create an extension database containing objects
|
||||
for administering &repmgr; metadata. The user defined in the <varname>conninfo</varname>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<chapter id="event-notifications" xreflabel="event notifications">
|
||||
<title>Event Notifications</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>event notifications</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Event Notifications</title>
|
||||
<para>
|
||||
Each time &repmgr; or &repmgrd; perform a significant event, a record
|
||||
of that event is written into the <literal>repmgr.events</literal> table together with
|
||||
@@ -27,7 +27,7 @@
|
||||
(3 rows)</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Alternatively, use <xref linkend="repmgr-cluster-event"> to output a
|
||||
Alternatively, use <xref linkend="repmgr-cluster-event"/> to output a
|
||||
formatted list of events.
|
||||
</para>
|
||||
<para>
|
||||
@@ -103,10 +103,10 @@
|
||||
<term><option>%p</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
node ID of the current primary (<xref linkend="repmgr-standby-register"> and <xref linkend="repmgr-standby-follow">)
|
||||
node ID of the current primary (<xref linkend="repmgr-standby-register"/> and <xref linkend="repmgr-standby-follow"/>)
|
||||
</para>
|
||||
<para>
|
||||
node ID of the demoted primary (<xref linkend="repmgr-standby-switchover"> only)
|
||||
node ID of the demoted primary (<xref linkend="repmgr-standby-switchover"/> only)
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -115,7 +115,7 @@
|
||||
<listitem>
|
||||
<para>
|
||||
<literal>conninfo</literal> string of the primary node
|
||||
(<xref linkend="repmgr-standby-register"> and <xref linkend="repmgr-standby-follow">)
|
||||
(<xref linkend="repmgr-standby-register"/> and <xref linkend="repmgr-standby-follow"/>)
|
||||
</para>
|
||||
<para>
|
||||
<literal>conninfo</literal> string of the next available node
|
||||
@@ -128,7 +128,7 @@
|
||||
<term><option>%a</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
name of the current primary node (<xref linkend="repmgr-standby-register"> and <xref linkend="repmgr-standby-follow">)
|
||||
name of the current primary node (<xref linkend="repmgr-standby-register"/> and <xref linkend="repmgr-standby-follow"/>)
|
||||
</para>
|
||||
<para>
|
||||
name of the next available node (<varname>bdr_failover</varname> and <varname>bdr_recovery</varname>)
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
<chapter id="follow-new-primary">
|
||||
<title>Following a new primary</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>Following a new primary</primary>
|
||||
<seealso>repmgr standby follow</seealso>
|
||||
</indexterm>
|
||||
|
||||
<title>Following a new primary</title>
|
||||
<para>
|
||||
Following the failure or removal of the replication cluster's existing primary
|
||||
server, <xref linkend="repmgr-standby-follow"> can be used to make 'orphaned' standbys
|
||||
server, <xref linkend="repmgr-standby-follow"/> can be used to make "orphaned" standbys
|
||||
follow the new primary and catch up to its current state.
|
||||
</para>
|
||||
<para>
|
||||
To demonstrate this, assuming a replication cluster in the same state as the
|
||||
end of the preceding section (<xref linkend="promoting-standby">),
|
||||
end of the preceding section (<xref linkend="promoting-standby"/>),
|
||||
execute this:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf standby follow
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
|
||||
<sect2 id="installation-packages-redhat" xreflabel="Installing from packages on RHEL, CentOS and Fedora">
|
||||
|
||||
<title>RedHat/CentOS/Fedora</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
<secondary>on Red Hat/CentOS/Fedora etc.</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>RedHat/CentOS/Fedora</title>
|
||||
<para>
|
||||
&repmgr; RPM packages for RedHat/CentOS variants and Fedora are available from the
|
||||
<ulink url="https://2ndquadrant.com">2ndQuadrant</ulink>
|
||||
@@ -46,7 +47,7 @@
|
||||
<para>
|
||||
For more information on the package contents, including details of installation
|
||||
paths and relevant <link linkend="configuration-file-service-commands">service commands</link>,
|
||||
see the appendix section <xref linkend="packages-centos">.
|
||||
see the appendix section <xref linkend="packages-centos"/>.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -105,7 +106,7 @@ sudo yum repolist</programlisting>
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Install the &repmgr version appropriate for your PostgreSQL version (e.g. <literal>repmgr10</literal>):
|
||||
Install the &repmgr; version appropriate for your PostgreSQL version (e.g. <literal>repmgr10</literal>):
|
||||
<programlisting>
|
||||
sudo yum install repmgr10</programlisting>
|
||||
</para>
|
||||
@@ -181,12 +182,13 @@ yum search repmgr</programlisting>
|
||||
|
||||
<sect2 id="installation-packages-debian" xreflabel="Installing from packages on Debian or Ubuntu">
|
||||
|
||||
<title>Debian/Ubuntu</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
<secondary>on Debian/Ubuntu etc.</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Debian/Ubuntu</title>
|
||||
<para>.deb packages for &repmgr; are available from the
|
||||
PostgreSQL Community APT repository (<ulink url="http://apt.postgresql.org/">http://apt.postgresql.org/</ulink>).
|
||||
Instructions can be found in the APT section of the PostgreSQL Wiki
|
||||
@@ -195,7 +197,7 @@ yum search repmgr</programlisting>
|
||||
<para>
|
||||
For more information on the package contents, including details of installation
|
||||
paths and relevant <link linkend="configuration-file-service-commands">service commands</link>,
|
||||
see the appendix section <xref linkend="packages-debian-ubuntu">.
|
||||
see the appendix section <xref linkend="packages-debian-ubuntu"/>.
|
||||
</para>
|
||||
|
||||
<sect3 id="installation-packages-debian-ubuntu-2ndq">
|
||||
@@ -242,7 +244,7 @@ curl https://dl.2ndquadrant.com/default/release/get/deb | sudo bash</programlist
|
||||
|
||||
<listitem>
|
||||
<para>
|
||||
Install the &repmgr version appropriate for your PostgreSQL version (e.g. <literal>repmgr10</literal>):
|
||||
Install the &repmgr; version appropriate for your PostgreSQL version (e.g. <literal>repmgr10</literal>):
|
||||
<programlisting>
|
||||
sudo apt-get install postgresql-10-repmgr</programlisting>
|
||||
</para>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<sect1 id="install-requirements" xreflabel="installation requirements">
|
||||
|
||||
<title>Requirements for installing repmgr</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
<secondary>requirements</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Requirements for installing repmgr</title>
|
||||
<para>
|
||||
repmgr is developed and tested on Linux and OS X, but should work on any
|
||||
UNIX-like system supported by PostgreSQL itself. There is no support for
|
||||
@@ -20,7 +21,7 @@
|
||||
|
||||
<note>
|
||||
<simpara>
|
||||
If upgrading from &repmgr; 3.x, please see the section <xref linkend="upgrading-from-repmgr-3">.
|
||||
If upgrading from &repmgr; 3.x, please see the section <xref linkend="upgrading-from-repmgr-3"/>.
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
@@ -72,6 +73,8 @@
|
||||
|
||||
<sect2 id="install-compatibility-matrix">
|
||||
|
||||
<title>&repmgr; compatibility matrix</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr</primary>
|
||||
<secondary>compatibility matrix</secondary>
|
||||
@@ -81,7 +84,6 @@
|
||||
<primary>compatibility matrix</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>&repmgr; compatibility matrix</title>
|
||||
<para>
|
||||
The following table provides an overview of which &repmgr; version supports
|
||||
which PostgreSQL version.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<sect1 id="installation-source" xreflabel="Installing from source code">
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
<secondary>from source</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Installing &repmgr; from source</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
<secondary>from source</secondary>
|
||||
</indexterm>
|
||||
|
||||
<sect2 id="installation-source-prereqs">
|
||||
<title>Prerequisites for installing from source</title>
|
||||
<para>
|
||||
@@ -200,7 +201,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
|
||||
&repmgr; website along with a tarball checksum and a matching GnuPG
|
||||
signature. See
|
||||
<ulink url="http://repmgr.org/">http://repmgr.org/</ulink>
|
||||
for the download information. See <xref linkend="appendix-signatures">
|
||||
for the download information. See <xref linkend="appendix-signatures"/>
|
||||
for information on verifying digital signatures.
|
||||
</para>
|
||||
|
||||
@@ -208,11 +209,11 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
|
||||
You will need to download the repmgr source, e.g. <filename>repmgr-4.0.tar.gz</filename>.
|
||||
You may optionally verify the package checksums from the
|
||||
<literal>.md5</literal> files and/or verify the GnuPG signatures
|
||||
per <xref linkend="appendix-signatures">.
|
||||
per <xref linkend="appendix-signatures"/>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After you unpack the source code archives using <literal>tar xf</literal>
|
||||
After you unpack the source code archives using <command>tar xf</command>
|
||||
the installation process is the same as if you were installing from a git
|
||||
clone.
|
||||
</para>
|
||||
@@ -227,7 +228,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
|
||||
To installing &repmgr; from source, simply execute:
|
||||
|
||||
<programlisting>
|
||||
./configure && make install</programlisting>
|
||||
./configure && make install</programlisting>
|
||||
|
||||
Ensure <command>pg_config</command> for the target PostgreSQL version is in
|
||||
<varname>$PATH</varname>.
|
||||
@@ -245,7 +246,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
|
||||
<ulink url="https://www.postgresql.org/docs/9.6/docguide-toolsets.html">
|
||||
PostgreSQL documentation</ulink> then execute:
|
||||
<programlisting>
|
||||
./configure && make install-doc</programlisting>
|
||||
./configure && make install-doc</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
The generated HTML files will be placed in the <filename>doc/html</filename>
|
||||
@@ -255,7 +256,7 @@ deb-src http://apt.postgresql.org/pub/repos/apt/ stretch-pgdg main</programlisti
|
||||
<para>
|
||||
To build the documentation as a single HTML file, execute:
|
||||
<programlisting>
|
||||
cd doc/ && make repmgr.html</programlisting>
|
||||
cd doc/ && make repmgr.html</programlisting>
|
||||
</para>
|
||||
|
||||
<note>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<chapter id="installation" xreflabel="Installation">
|
||||
|
||||
<title>Installation</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>installation</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Installation</title>
|
||||
|
||||
<para>
|
||||
&repmgr; can be installed from binary packages provided by your operating
|
||||
system's packaging system, or from source.
|
||||
@@ -18,7 +19,7 @@
|
||||
only option if there are no packages for your operating system yet.
|
||||
</para>
|
||||
<para>
|
||||
Before installing &repmgr; make sure you satisfy the <xref linkend="install-requirements">.
|
||||
Before installing &repmgr; make sure you satisfy the <xref linkend="install-requirements"/>.
|
||||
</para>
|
||||
|
||||
&install-requirements;
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
</para>
|
||||
<sect1 id="repmgr-concepts" xreflabel="Concepts">
|
||||
|
||||
<title>Concepts</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>concepts</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Concepts</title>
|
||||
|
||||
<para>
|
||||
This guide assumes that you are familiar with PostgreSQL administration and
|
||||
streaming replication concepts. For further details on streaming
|
||||
replication, see the PostgreSQL documentation section on <ulink
|
||||
url="https://www.postgresql.org/docs/current/interactive/warm-standby.html#STREAMING-REPLICATION">
|
||||
streaming replication</>.
|
||||
streaming replication</ulink>.
|
||||
</para>
|
||||
<para>
|
||||
The following terms are used throughout the &repmgr; documentation.
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<chapter id="promoting-standby" xreflabel="Promoting a standby">
|
||||
<title>Promoting a standby server with repmgr</title>
|
||||
<indexterm>
|
||||
<primary>promoting a standby</primary>
|
||||
<seealso>repmgr standby promote</seealso>
|
||||
</indexterm>
|
||||
<title>Promoting a standby server with repmgr</title>
|
||||
<para>
|
||||
If a primary server fails or needs to be removed from the replication cluster,
|
||||
a new primary server must be designated, to ensure the cluster continues
|
||||
to function correctly. This can be done with <xref linkend="repmgr-standby-promote">,
|
||||
to function correctly. This can be done with <xref linkend="repmgr-standby-promote"/>,
|
||||
which promotes the standby on the current server to primary.
|
||||
</para>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
At this point the replication cluster will be in a partially disabled state, with
|
||||
both standbys accepting read-only connections while attempting to connect to the
|
||||
stopped primary. Note that the &repmgr; metadata table will not yet have been updated;
|
||||
executing <xref linkend="repmgr-cluster-show"> will note the discrepancy:
|
||||
executing <xref linkend="repmgr-cluster-show"/> will note the discrepancy:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf cluster show
|
||||
ID | Name | Role | Status | Upstream | Location | Connection string
|
||||
@@ -60,7 +60,7 @@
|
||||
DETAIL: node 2 was successfully promoted to primary</programlisting>
|
||||
</para>
|
||||
<para>
|
||||
Executing <xref linkend="repmgr-cluster-show"> will show the current state; as there is now an
|
||||
Executing <xref linkend="repmgr-cluster-show"/> will show the current state; as there is now an
|
||||
active primary, the previous warning will not be displayed:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf cluster show
|
||||
@@ -72,8 +72,8 @@
|
||||
</para>
|
||||
<para>
|
||||
However the sole remaining standby (<literal>node3</literal>) is still trying to replicate from the failed
|
||||
primary; <xref linkend="repmgr-standby-follow"> must now be executed to rectify this situation
|
||||
(see <xref linkend="follow-new-primary"> for example).
|
||||
primary; <xref linkend="repmgr-standby-follow"/> must now be executed to rectify this situation
|
||||
(see <xref linkend="follow-new-primary"/> for example).
|
||||
</para>
|
||||
</chapter>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<note>
|
||||
<simpara>
|
||||
To upgrade an existing &repmgr; 3.x installation, see section
|
||||
<xref linkend="upgrading-from-repmgr-3">.
|
||||
<xref linkend="upgrading-from-repmgr-3"/>.
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<para>
|
||||
Additionally, if you are intending to use <application>pg_rewind</application>,
|
||||
and the cluster was not initialised using data checksums, you may want to consider enabling
|
||||
<varname>wal_log_hints</varname>; for more details see <xref linkend="repmgr-node-rejoin-pg-rewind">.
|
||||
<varname>wal_log_hints</varname>; for more details see <xref linkend="repmgr-node-rejoin-pg-rewind"/>.
|
||||
</para>
|
||||
<para>
|
||||
See also the <link linkend="configuration-postgresql">PostgreSQL configuration</link> section in the
|
||||
@@ -262,7 +262,7 @@
|
||||
<para>
|
||||
<filename>repmgr.conf</filename> should not be stored inside the PostgreSQL data directory,
|
||||
as it could be overwritten when setting up or reinitialising the PostgreSQL
|
||||
server. See sections <xref linkend="configuration"> and <xref linkend="configuration-file">
|
||||
server. See sections <xref linkend="configuration"/> and <xref linkend="configuration-file"/>
|
||||
for further details about <filename>repmgr.conf</filename>.
|
||||
</para>
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
<para>
|
||||
See the file
|
||||
<ulink url="https://raw.githubusercontent.com/2ndQuadrant/repmgr/master/repmgr.conf.sample">repmgr.conf.sample</>
|
||||
<ulink url="https://raw.githubusercontent.com/2ndQuadrant/repmgr/master/repmgr.conf.sample">repmgr.conf.sample</ulink>
|
||||
for details of all available configuration parameters.
|
||||
</para>
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
For more details see the sections <xref linkend="repmgrd-monitoring"> and
|
||||
<xref linkend="repmgrd-monitoring-configuration">.
|
||||
For more details see the sections <xref linkend="repmgrd-monitoring"/> and
|
||||
<xref linkend="repmgrd-monitoring-configuration"/>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<para>
|
||||
<command>repmgr cluster crosscheck</command> is similar to <xref linkend="repmgr-cluster-matrix">,
|
||||
<command>repmgr cluster crosscheck</command> is similar to <xref linkend="repmgr-cluster-matrix"/>,
|
||||
but cross-checks connections between each combination of nodes. In "Example 3" in
|
||||
<xref linkend="repmgr-cluster-matrix"> we have no information about the state of <literal>node3</literal>.
|
||||
<xref linkend="repmgr-cluster-matrix"/> we have no information about the state of <literal>node3</literal>.
|
||||
However by running <command>repmgr cluster crosscheck</command> it's possible to get a better
|
||||
overview of the cluster situation:
|
||||
<programlisting>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<simpara><literal>--node-name</literal>: restrict entries to node with this name</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara><literal>--event</literal>: filter specific event (see <xref linkend="event-notifications"> for a full list)</simpara>
|
||||
<simpara><literal>--event</literal>: filter specific event (see <xref linkend="event-notifications"/> for a full list)</simpara>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
connection from <literal>node3</literal>.
|
||||
</para>
|
||||
<para>
|
||||
In this case, the <xref linkend="repmgr-cluster-crosscheck"> command will produce a more
|
||||
In this case, the <xref linkend="repmgr-cluster-crosscheck"/> command will produce a more
|
||||
useful result.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<para>
|
||||
Node availability is tested by connecting from the node where
|
||||
<command>repmgr cluster show</command> is executed, and does not necessarily imply the node
|
||||
is down. See <xref linkend="repmgr-cluster-matrix"> and <xref linkend="repmgr-cluster-crosscheck"> to get
|
||||
is down. See <xref linkend="repmgr-cluster-matrix"/> and <xref linkend="repmgr-cluster-crosscheck"/> to get
|
||||
better overviews of connections between nodes.
|
||||
</para>
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
Use <xref linkend="repmgr-cluster-matrix"> and <xref linkend="repmgr-cluster-crosscheck">
|
||||
Use <xref linkend="repmgr-cluster-matrix"/> and <xref linkend="repmgr-cluster-crosscheck"/>
|
||||
to diagnose connection issues across the whole replication cluster.
|
||||
</para>
|
||||
</tip>
|
||||
@@ -231,7 +231,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-node-status">, <xref linkend="repmgr-node-check">, <xref linkend="repmgr-daemon-status">
|
||||
<xref linkend="repmgr-node-status"/>, <xref linkend="repmgr-node-check"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-unpause"> will instruct all previously paused &repmgrd;
|
||||
<xref linkend="repmgr-daemon-unpause"/> will instruct all previously paused &repmgrd;
|
||||
instances to resume normal failover operation.
|
||||
</para>
|
||||
</refsect1>
|
||||
@@ -107,7 +107,7 @@ NOTICE: node 3 (node3) paused</programlisting>
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-unpause">, <xref linkend="repmgr-daemon-status">
|
||||
<xref linkend="repmgr-daemon-unpause"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<para>
|
||||
The <filename>repmgr.conf</filename> parameter <varname>repmgrd_service_start_command</varname>
|
||||
must be set for <command>repmgr daemon start</command> to work; see section
|
||||
<xref linkend="repmgr-daemon-start-configuration"> for details.
|
||||
<xref linkend="repmgr-daemon-start-configuration"/> for details.
|
||||
</para>
|
||||
</important>
|
||||
</refsect1>
|
||||
@@ -99,13 +99,14 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>repmgrd_service_start_command</primary>
|
||||
<secondary>with "repmgr daemon start"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>repmgrd_service_start_command</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>repmgrd_service_start_command</primary>
|
||||
<secondary>with "repmgr daemon start"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<command>repmgr daemon start</command> will execute the command defined by the
|
||||
<varname>repmgrd_service_start_command</varname> parameter in <filename>repmgr.conf</filename>.
|
||||
@@ -196,7 +197,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-stop">, <xref linkend="repmgr-daemon-status">, <xref linkend="repmgrd-daemon">
|
||||
<xref linkend="repmgr-daemon-stop"/>, <xref linkend="repmgr-daemon-status"/>, <xref linkend="repmgrd-daemon"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<para>
|
||||
This command provides an overview over all active nodes in the cluster and the state
|
||||
of each node's &repmgrd; instance. It can be used to check
|
||||
the result of <xref linkend="repmgr-daemon-pause"> and <xref linkend="repmgr-daemon-unpause">
|
||||
the result of <xref linkend="repmgr-daemon-pause"/> and <xref linkend="repmgr-daemon-unpause"/>
|
||||
operations.
|
||||
</para>
|
||||
</refsect1>
|
||||
@@ -60,7 +60,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
&repmgrd; paused on all nodes (using <xref linkend="repmgr-daemon-pause">):
|
||||
&repmgrd; paused on all nodes (using <xref linkend="repmgr-daemon-pause"/>):
|
||||
<programlisting>$ repmgr -f /etc/repmgr.conf daemon status
|
||||
ID | Name | Role | Status | Upstream | repmgrd | PID | Paused? | Upstream last seen
|
||||
----+-------+---------+-----------+----------+---------+-------+---------+--------------------
|
||||
@@ -192,7 +192,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-pause">, <xref linkend="repmgr-daemon-unpause">, <xref linkend="repmgr-cluster-show">
|
||||
<xref linkend="repmgr-daemon-pause"/>, <xref linkend="repmgr-daemon-unpause"/>, <xref linkend="repmgr-cluster-show"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<para>
|
||||
The <filename>repmgr.conf</filename> parameter <varname>repmgrd_service_stop_command</varname>
|
||||
must be set for <command>repmgr daemon stop</command> to work; see section
|
||||
<xref linkend="repmgr-daemon-stop-configuration"> for details.
|
||||
<xref linkend="repmgr-daemon-stop-configuration"/> for details.
|
||||
</para>
|
||||
</important>
|
||||
</refsect1>
|
||||
@@ -124,13 +124,14 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>repmgrd_service_stop_command</primary>
|
||||
<secondary>with "repmgr daemon stop"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>repmgrd_service_stop_command</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>repmgrd_service_stop_command</primary>
|
||||
<secondary>with "repmgr daemon stop"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<command>repmgr daemon stop</command> will execute the command defined by the
|
||||
<varname>repmgrd_service_stop_command</varname> parameter in <filename>repmgr.conf</filename>.
|
||||
@@ -193,7 +194,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-start">, <xref linkend="repmgr-daemon-status">, <xref linkend="repmgrd-daemon">
|
||||
<xref linkend="repmgr-daemon-start"/>, <xref linkend="repmgr-daemon-status"/>, <xref linkend="repmgrd-daemon"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<para>
|
||||
This command can be run on any active node in the replication cluster to instruct all
|
||||
running &repmgrd; instances to "unpause"
|
||||
(following a previous execution of <xref linkend="repmgr-daemon-pause">)
|
||||
(following a previous execution of <xref linkend="repmgr-daemon-pause"/>)
|
||||
and resume normal failover/monitoring operation.
|
||||
</para>
|
||||
|
||||
@@ -102,7 +102,7 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-daemon-pause">, <xref linkend="repmgr-daemon-status">
|
||||
<xref linkend="repmgr-daemon-pause"/>, <xref linkend="repmgr-daemon-status"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-node-status">, <xref linkend="repmgr-cluster-show">
|
||||
<xref linkend="repmgr-node-status"/>, <xref linkend="repmgr-cluster-show"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
<tip>
|
||||
<para>
|
||||
If the node is running and needs to be attached to the current primary, use
|
||||
<xref linkend="repmgr-standby-follow">.
|
||||
<xref linkend="repmgr-standby-follow"/>.
|
||||
</para>
|
||||
<para>
|
||||
Note <xref linkend="repmgr-standby-follow"> can only be used for standbys which have not diverged
|
||||
Note <xref linkend="repmgr-standby-follow"/> can only be used for standbys which have not diverged
|
||||
from the rest of the cluster.
|
||||
</para>
|
||||
</tip>
|
||||
@@ -230,12 +230,13 @@
|
||||
|
||||
<refsect1 id="repmgr-node-rejoin-pg-rewind" xreflabel="Using pg_rewind">
|
||||
|
||||
<title>Using <command>pg_rewind</command></title>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_rewind</primary>
|
||||
<secondary>using with "repmgr node rejoin"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Using <command>pg_rewind</command></title>
|
||||
<para>
|
||||
<command>repmgr node rejoin</command> can optionally use <command>pg_rewind</command> to re-integrate a
|
||||
node which has diverged from the rest of the cluster, typically a failed primary.
|
||||
@@ -321,7 +322,7 @@
|
||||
If <option>--force-rewind</option> is used with the <option>--dry-run</option> option,
|
||||
this checks the prerequisites for using <application>pg_rewind</application>, but is
|
||||
not an absolute guarantee that actually executing <application>pg_rewind</application>
|
||||
will succeed. See also section <xref linkend="repmgr-node-rejoin-caveats"> below.
|
||||
will succeed. See also section <xref linkend="repmgr-node-rejoin-caveats"/> below.
|
||||
</para>
|
||||
|
||||
</note>
|
||||
@@ -344,12 +345,13 @@
|
||||
|
||||
<refsect1 id="repmgr-node-rejoin-caveats" xreflabel="Caveats">
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr node rejoin</primary>
|
||||
<secondary>caveats</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Caveats when using <command>repmgr node rejoin</command></title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgr node rejoin</primary>
|
||||
<secondary>caveats</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<command>repmgr node rejoin</command> attempts to determine whether it will succeed by
|
||||
comparing the timelines and relative WAL positions of the local node (rejoin candidate) and primary
|
||||
@@ -381,7 +383,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-standby-follow">
|
||||
<xref linkend="repmgr-standby-follow"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
See <xref linkend="repmgr-node-check"> to diagnose issues and <xref linkend="repmgr-cluster-show">
|
||||
See <xref linkend="repmgr-node-check"/> to diagnose issues and <xref linkend="repmgr-cluster-show"/>
|
||||
for an overview of all nodes in the cluster.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
If providing the configuration file location with <option>-f/--config-file</option>,
|
||||
avoid using a relative path, as &repmgr; stores the configuration file location
|
||||
in the repmgr metadata for use when &repmgr; is executed remotely (e.g. during
|
||||
<xref linkend="repmgr-standby-switchover">). &repmgr; will attempt to convert the
|
||||
<xref linkend="repmgr-standby-switchover"/>). &repmgr; will attempt to convert the
|
||||
a relative path into an absolute one, but this may not be the same as the path you
|
||||
would explicitly provide (e.g. <filename>./repmgr.conf</filename> might be converted
|
||||
to <filename>/path/to/./repmgr.conf</filename>, whereas you'd normally write
|
||||
|
||||
@@ -85,12 +85,13 @@
|
||||
</refsect1>
|
||||
|
||||
<refsect1 id="repmgr-standby-clone-recovery-conf">
|
||||
<indexterm>
|
||||
<title>Customising recovery.conf</title>
|
||||
<indexterm>
|
||||
<primary>recovery.conf</primary>
|
||||
<secondary>customising with "repmgr standby clone"</secondary>
|
||||
</indexterm>
|
||||
</indexterm>
|
||||
|
||||
|
||||
<title>Customising recovery.conf</title>
|
||||
<para>
|
||||
By default, &repmgr; will create a minimal <filename>recovery.conf</filename>
|
||||
containing following parameters:
|
||||
@@ -142,7 +143,7 @@
|
||||
We recommend using <ulink url="https://www.pgbarman.org/">Barman</ulink> to manage
|
||||
WAL file archiving. For more details on combining &repmgr; and <application>Barman</application>,
|
||||
in particular using <varname>restore_command</varname> to configure Barman as a backup source of
|
||||
WAL files, see <xref linkend="cloning-from-barman">.
|
||||
WAL files, see <xref linkend="cloning-from-barman"/>.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
@@ -186,12 +187,13 @@
|
||||
|
||||
<refsect1 id="repmgr-standby-create-recovery-conf">
|
||||
|
||||
<title>Using a standby cloned by another method</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>recovery.conf</primary>
|
||||
<secondary>generating for a standby cloned by another method</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Using a standby cloned by another method</title>
|
||||
<para>
|
||||
&repmgr; supports standbys cloned by another method (e.g. using <application>barman</application>'s
|
||||
<command><ulink url="http://docs.pgbarman.org/release/2.5/#recover">barman recover</ulink></command> command).
|
||||
@@ -296,7 +298,7 @@
|
||||
<term><option> --recovery-conf-only</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Create <filename>recovery.conf</filename> file for a previously cloned instance. &repmgr 4.0.4 and later.
|
||||
Create <filename>recovery.conf</filename> file for a previously cloned instance. &repmgr; 4.0.4 and later.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -361,7 +363,7 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
See <xref linkend="cloning-standbys"> for details about various aspects of cloning.
|
||||
See <xref linkend="cloning-standbys"/> for details about various aspects of cloning.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<tip>
|
||||
<para>
|
||||
To re-add an inactive node to the replication cluster, use
|
||||
<xref linkend="repmgr-node-rejoin">.
|
||||
<xref linkend="repmgr-node-rejoin"/>.
|
||||
</para>
|
||||
</tip>
|
||||
|
||||
@@ -252,7 +252,7 @@ DETAIL: follow target server's timeline 2 forked off current database system tim
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-node-rejoin">
|
||||
<xref linkend="repmgr-node-rejoin"/>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
If providing the configuration file location with <literal>-f/--config-file</literal>,
|
||||
avoid using a relative path, as &repmgr; stores the configuration file location
|
||||
in the repmgr metadata for use when &repmgr; is executed remotely (e.g. during
|
||||
<xref linkend="repmgr-standby-switchover">). &repmgr; will attempt to convert the
|
||||
<xref linkend="repmgr-standby-switchover"/>). &repmgr; will attempt to convert the
|
||||
a relative path into an absolute one, but this may not be the same as the path you
|
||||
would explicitly provide (e.g. <filename>./repmgr.conf</filename> might be converted
|
||||
to <filename>/path/to/./repmgr.conf</filename>, whereas you'd normally write
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
</note>
|
||||
<para>
|
||||
For more details on performing a switchover, including preparation and configuration,
|
||||
see section <xref linkend="performing-switchover">.
|
||||
see section <xref linkend="performing-switchover"/>.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
@@ -52,7 +52,7 @@
|
||||
From <link linkend="release-4.2">repmgr 4.2</link>, &repmgr; will instruct any running
|
||||
&repmgrd; instances to pause operations while the switchover
|
||||
is being carried out, to prevent &repmgrd; from
|
||||
unintentionally promoting a node. For more details, see <xref linkend="repmgrd-pausing">.
|
||||
unintentionally promoting a node. For more details, see <xref linkend="repmgrd-pausing"/>.
|
||||
</para>
|
||||
<para>
|
||||
Users of &repmgr; versions prior to 4.2 should ensure that &repmgrd;
|
||||
@@ -117,7 +117,7 @@
|
||||
(and the prerequisites for using <application>pg_rewind</application> are met).
|
||||
If using PostgreSQL 9.3 or 9.4, and the <application>pg_rewind</application>
|
||||
binary is not installed in the PostgreSQL <filename>bin</filename> directory,
|
||||
provide its full path. For more details see also <xref linkend="switchover-pg-rewind">.
|
||||
provide its full path. For more details see also <xref linkend="switchover-pg-rewind"/>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -181,13 +181,14 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>replication_lag_critical</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>replication_lag_critical</option></term>
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>replication_lag_critical</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If replication lag (in seconds) on the standby exceeds this value, the
|
||||
switchover will be aborted (unless the <literal>-F/--force</literal> option
|
||||
@@ -197,13 +198,14 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>shutdown_check_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>shutdown_check_timeout</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>shutdown_check_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The maximum number of seconds to wait for the
|
||||
demotion candidate (current primary) to shut down, before aborting the switchover.
|
||||
@@ -225,13 +227,13 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>wal_receive_check_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>wal_receive_check_timeout</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>wal_receive_check_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
After the primary has shut down, the maximum number of seconds to wait for the
|
||||
walreceiver on the standby to flush WAL to disk before comparing WAL receive location
|
||||
@@ -242,13 +244,14 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>standby_reconnect_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<term><option>standby_reconnect_timeout</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>standby_reconnect_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The maximum number of seconds to attempt to wait for the demotion candidate (former primary)
|
||||
to reconnect to the promoted primary (default: 60 seconds)
|
||||
@@ -261,14 +264,16 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>node_rejoin_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
<varlistentry>
|
||||
|
||||
<term><option>node_rejoin_timeout</option></term>
|
||||
<listitem>
|
||||
|
||||
<indexterm>
|
||||
<primary>node_rejoin_timeout</primary>
|
||||
<secondary>with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
maximum number of seconds to attempt to wait for the demotion candidate (former primary)
|
||||
to reconnect to the promoted primary (default: 60 seconds)
|
||||
@@ -362,10 +367,10 @@
|
||||
<refsect1>
|
||||
<title>See also</title>
|
||||
<para>
|
||||
<xref linkend="repmgr-standby-follow">, <xref linkend="repmgr-node-rejoin">
|
||||
<xref linkend="repmgr-standby-follow"/>, <xref linkend="repmgr-node-rejoin"/>
|
||||
</para>
|
||||
<para>
|
||||
For more details on performing a switchover operation, see the section <xref linkend="performing-switchover">.
|
||||
For more details on performing a switchover operation, see the section <xref linkend="performing-switchover"/>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<!-- doc/repmgr.sgml -->
|
||||
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V4.2//EN" [
|
||||
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[
|
||||
<!ENTITY % version SYSTEM "version.sgml">
|
||||
%version;
|
||||
|
||||
@@ -38,7 +39,7 @@
|
||||
<para>
|
||||
&repmgr; is developed by
|
||||
<ulink url="https://2ndquadrant.com">2ndQuadrant</ulink>
|
||||
along with contributions from other individuals and companies.
|
||||
along with contributions from other individuals and organisations.
|
||||
Contributions from the community are appreciated and welcome - get
|
||||
in touch via <ulink url="https://github.com/2ndQuadrant/repmgr">github</ulink>
|
||||
or <ulink url="https://groups.google.com/group/repmgr">the mailing list/forum</ulink>.
|
||||
@@ -128,7 +129,6 @@
|
||||
&appendix-packages;
|
||||
&appendix-support;
|
||||
|
||||
<![%include-index;[&bookindex;]]>
|
||||
<![%include-xslt-index;[<index id="bookindex"></index>]]>
|
||||
<index id="bookindex"></index>
|
||||
|
||||
</book>
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<chapter id="repmgrd-automatic-failover" xreflabel="Automatic failover with repmgrd">
|
||||
|
||||
<title>Automatic failover with repmgrd</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>automatic failover</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Automatic failover with repmgrd</title>
|
||||
|
||||
<para>
|
||||
&repmgrd; is a management and monitoring daemon which runs
|
||||
on each node in a replication cluster. It can automate actions such as
|
||||
@@ -13,7 +14,9 @@
|
||||
providing monitoring information about the state of each standby.
|
||||
</para>
|
||||
|
||||
<sect1 id="repmgrd-witness-server" xreflabel="Using a witness server with repmgrd">
|
||||
<sect1 id="repmgrd-witness-server" xreflabel="Using a witness server with repmgrd">
|
||||
<title>Using a witness server</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>witness server</secondary>
|
||||
@@ -23,9 +26,9 @@
|
||||
<primary>witness server</primary>
|
||||
<secondary>repmgrd</secondary>
|
||||
</indexterm>
|
||||
<title>Using a witness server</title>
|
||||
|
||||
<para>
|
||||
A <xref linkend="witness-server"> is a normal PostgreSQL instance which
|
||||
A <xref linkend="witness-server"/> is a normal PostgreSQL instance which
|
||||
is not part of the streaming replication cluster; its purpose is, if a
|
||||
failover situation occurs, to provide proof that it is the primary server
|
||||
itself which is unavailable, rather than e.g. a network split between
|
||||
@@ -55,7 +58,7 @@
|
||||
For more complex replication scenarios,e.g. with multiple datacentres, it may
|
||||
be preferable to use location-based failover, which ensures that only nodes
|
||||
in the same location as the primary will ever be promotion candidates;
|
||||
see <xref linkend="repmgrd-network-split"> for more details.
|
||||
see <xref linkend="repmgrd-network-split"/> for more details.
|
||||
</para>
|
||||
|
||||
<note>
|
||||
@@ -85,10 +88,10 @@
|
||||
</note>
|
||||
<para>
|
||||
The witness server should be configured in the same way as a normal
|
||||
&repmgr; node; see section <xref linkend="configuration">.
|
||||
&repmgr; node; see section <xref linkend="configuration"/>.
|
||||
</para>
|
||||
<para>
|
||||
Register the witness server with <xref linkend="repmgr-witness-register">.
|
||||
Register the witness server with <xref linkend="repmgr-witness-register"/>.
|
||||
This will create the &repmgr; extension on the witness server, and make
|
||||
a copy of the &repmgr; metadata.
|
||||
</para>
|
||||
@@ -105,7 +108,7 @@
|
||||
</para>
|
||||
|
||||
<para>
|
||||
To unregister a witness server, use <xref linkend="repmgr-witness-unregister">.
|
||||
To unregister a witness server, use <xref linkend="repmgr-witness-unregister"/>.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
@@ -114,6 +117,7 @@
|
||||
|
||||
|
||||
<sect1 id="repmgrd-network-split" xreflabel="Handling network splits with repmgrd">
|
||||
<title>Handling network splits with repmgrd</title>
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>network splits</secondary>
|
||||
@@ -123,7 +127,6 @@
|
||||
<primary>network splits</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Handling network splits with repmgrd</title>
|
||||
<para>
|
||||
A common pattern for replication cluster setups is to spread servers over
|
||||
more than one datacentre. This can provide benefits such as geographically-
|
||||
@@ -134,7 +137,7 @@
|
||||
in the main data centre and promoted a standby among themselves.
|
||||
</para>
|
||||
<para>
|
||||
&repmgr; enables provision of "<xref linkend="witness-server">" to
|
||||
&repmgr; enables provision of "<xref linkend="witness-server"/>" to
|
||||
artificially create a quorum of servers in a particular location, ensuring
|
||||
that nodes in another location will not elect a new primary if they
|
||||
are unable to see the majority of nodes. However this approach does not
|
||||
@@ -166,6 +169,8 @@
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-primary-child-disconnection" xreflabel="Monitoring standby disconnections on the primary">
|
||||
<title>Monitoring standby disconnections on the primary node</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>standby disconnection</secondary>
|
||||
@@ -176,11 +181,9 @@
|
||||
<secondary>child node disconnection</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Monitoring standby disconnections on the primary node</title>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
This functionality is available in <link linkend="release-4.4">&repmgr 4.4</link> and later.
|
||||
This functionality is available in <link linkend="release-4.4">&repmgr; 4.4</link> and later.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
@@ -367,12 +370,13 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_check_interval</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_check_interval</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_check_interval</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
Interval (in seconds) after which &repmgrd; queries the
|
||||
<literal>pg_stat_replication</literal> system view and compares the nodes present
|
||||
@@ -386,12 +390,14 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_command</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_command</varname></term>
|
||||
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_command</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
User-definable script to be executed when &repmgrd;
|
||||
determines that an insufficient number of child nodes are connected. By default
|
||||
@@ -442,12 +448,14 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_timeout</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_timeout</varname></term>
|
||||
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_timeout</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If &repmgrd; determines that an insufficient number of
|
||||
child nodes are connected, it will wait for the specified number of seconds
|
||||
@@ -460,12 +468,13 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_connected_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_connected_min_count</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_connected_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If the number of child nodes connected falls below the number specified in
|
||||
this parameter, the <varname>child_nodes_disconnect_command</varname> script
|
||||
@@ -492,12 +501,13 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_min_count</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_min_count</primary>
|
||||
<secondary>child node disconnection monitoring</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If the number of disconnected child nodes exceeds the number specified in
|
||||
this parameter, the <varname>child_nodes_disconnect_command</varname> script
|
||||
@@ -536,12 +546,13 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_node_disconnect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_node_disconnect</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_node_disconnect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
This event is generated after &repmgrd;
|
||||
detects that a child node is no longer streaming from the primary node.
|
||||
@@ -558,12 +569,13 @@ $ repmgr cluster event --event=child_node_disconnect
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_node_reconnect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_node_reconnect</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_node_reconnect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
This event is generated after &repmgrd;
|
||||
detects that a child node has resumed streaming from the primary node.
|
||||
@@ -580,12 +592,13 @@ $ repmgr cluster event --event=child_node_reconnect
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_node_new_connect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_node_new_connect</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_node_new_connect</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
This event is generated after &repmgrd;
|
||||
detects that a new child node has been registered with &repmgr; and has
|
||||
@@ -603,12 +616,13 @@ $ repmgr cluster event --event=child_node_new_connect
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_command</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
<term><varname>child_nodes_disconnect_command</varname></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>child_nodes_disconnect_command</primary>
|
||||
<secondary>event notification</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
This event is generated after &repmgrd; detects
|
||||
that sufficient child nodes have been disconnected for a sufficient amount
|
||||
@@ -633,6 +647,8 @@ $ repmgr cluster event --event=child_nodes_disconnect_command
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-standby-disconnection-on-failover" xreflabel="Standby disconnection on failover">
|
||||
<title>Standby disconnection on failover</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>standby disconnection on failover</secondary>
|
||||
@@ -642,7 +658,6 @@ $ repmgr cluster event --event=child_nodes_disconnect_command
|
||||
<primary>standby disconnection on failover</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Standby disconnection on failover</title>
|
||||
<para>
|
||||
If <option>standby_disconnect_on_failover</option> is set to <literal>true</literal> in
|
||||
<filename>repmgr.conf</filename>, in a failover situation &repmgrd; will forcibly disconnect
|
||||
@@ -680,6 +695,8 @@ $ repmgr cluster event --event=child_nodes_disconnect_command
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-failover-validation" xreflabel="Failover validation">
|
||||
<title>Failover validation</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>failover validation</secondary>
|
||||
@@ -689,7 +706,6 @@ $ repmgr cluster event --event=child_nodes_disconnect_command
|
||||
<primary>failover validation</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Failover validation</title>
|
||||
<para>
|
||||
From <link linkend="release-4.3">repmgr 4.3</link>, &repmgr; makes it possible to provide a script
|
||||
to &repmgrd; which, in a failover situation,
|
||||
@@ -733,18 +749,19 @@ INFO: node 3 received notification to rerun promotion candidate election
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="cascading-replication" xreflabel="Cascading replication">
|
||||
<indexterm>
|
||||
<sect1 id="cascading-replication" xreflabel="Cascading replication">
|
||||
<title>repmgrd and cascading replication</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>cascading replication</secondary>
|
||||
</indexterm>
|
||||
</indexterm>
|
||||
|
||||
<indexterm>
|
||||
<primary>cascading replication</primary>
|
||||
<secondary>repmgrd</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd and cascading replication</title>
|
||||
<para>
|
||||
Cascading replication - where a standby can connect to an upstream node and not
|
||||
the primary server itself - was introduced in PostgreSQL 9.2. &repmgr; and
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<chapter id="repmgrd-bdr">
|
||||
<title>BDR failover with repmgrd</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>BDR</secondary>
|
||||
@@ -8,7 +10,6 @@
|
||||
<primary>BDR</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>BDR failover with repmgrd</title>
|
||||
<para>
|
||||
&repmgr; 4.x provides support for monitoring a pair of BDR 2.x nodes and taking action in
|
||||
case one of the nodes fails.
|
||||
@@ -94,7 +95,7 @@
|
||||
|
||||
# Event notification configuration
|
||||
event_notifications=bdr_failover
|
||||
event_notification_command='/path/to/bdr-pgbouncer.sh %n %e %s "%c" "%a" >> /tmp/bdr-failover.log 2>&1'
|
||||
event_notification_command='/path/to/bdr-pgbouncer.sh %n %e %s "%c" "%a" >> /tmp/bdr-failover.log 2>&1'
|
||||
|
||||
# repmgrd options
|
||||
monitor_interval_secs=5
|
||||
@@ -120,7 +121,7 @@
|
||||
<simpara>
|
||||
<varname>event_notification_command</varname> is the script which does the actual "heavy lifting"
|
||||
of reconfiguring the proxy server/ connection pooler. It is fully
|
||||
user-definable; see section <xref linkend="bdr-event-notification-command"> for a reference
|
||||
user-definable; see section <xref linkend="bdr-event-notification-command"/> for a reference
|
||||
implementation.
|
||||
</simpara>
|
||||
</note>
|
||||
@@ -158,7 +159,7 @@
|
||||
</important>
|
||||
<para>
|
||||
At this point the meta data for both nodes has been created; executing
|
||||
<xref linkend="repmgr-cluster-show"> (on either node) should produce output like this:
|
||||
<xref linkend="repmgr-cluster-show"/> (on either node) should produce output like this:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf cluster show
|
||||
ID | Name | Role | Status | Upstream | Location | Connection string
|
||||
@@ -168,7 +169,7 @@
|
||||
</para>
|
||||
<para>
|
||||
Additionally it's possible to display log of significant events; executing
|
||||
<xref linkend="repmgr-cluster-event"> (on either node) should produce output like this:
|
||||
<xref linkend="repmgr-cluster-event"/> (on either node) should produce output like this:
|
||||
<programlisting>
|
||||
$ repmgr -f /etc/repmgr.conf cluster event
|
||||
Node ID | Event | OK | Timestamp | Details
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<chapter id="repmgrd-configuration">
|
||||
|
||||
<title>repmgrd setup and configuration</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd setup and configuration</title>
|
||||
|
||||
<para>
|
||||
&repmgrd; is a daemon which runs on each PostgreSQL node,
|
||||
monitoring the local node, and (unless it's the primary node) the upstream server
|
||||
@@ -39,108 +39,111 @@
|
||||
</para>
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<varlistentry>
|
||||
<term><option>monitor_interval_secs</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>monitor_interval_secs</primary>
|
||||
</indexterm>
|
||||
<term><option>monitor_interval_secs</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The interval (in seconds, default: <literal>2</literal>) to check the availability of the upstream node.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</varlistentry>
|
||||
<para>
|
||||
The interval (in seconds, default: <literal>2</literal>) to check the availability of the upstream node.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<varlistentry id="connection-check-type">
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="connection-check-type">
|
||||
|
||||
<term><option>connection_check_type</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>connection_check_type</primary>
|
||||
</indexterm>
|
||||
<term><option>connection_check_type</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The option <option>connection_check_type</option> is used to select the method
|
||||
&repmgrd; uses to determine whether the upstream node is available.
|
||||
</para>
|
||||
<para>
|
||||
Possible values are:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
<listitem>
|
||||
|
||||
<para>
|
||||
The option <option>connection_check_type</option> is used to select the method
|
||||
&repmgrd; uses to determine whether the upstream node is available.
|
||||
</para>
|
||||
<para>
|
||||
Possible values are:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>ping</literal> (default) - uses <command>PQping()</command> to
|
||||
determine server availability
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>connection</literal> - determines server availability
|
||||
by attempt ingto make a new connection to the upstream node
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>query</literal> - determines server availability
|
||||
by executing an SQL statement on the node via the existing connection
|
||||
</simpara>
|
||||
</listitem>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>connection</literal> - determines server availability
|
||||
by attempt ingto make a new connection to the upstream node
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<simpara>
|
||||
<literal>query</literal> - determines server availability
|
||||
by executing an SQL statement on the node via the existing connection
|
||||
</simpara>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<varlistentry>
|
||||
<term><option>reconnect_attempts</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>reconnect_attempts</primary>
|
||||
</indexterm>
|
||||
<term><option>reconnect_attempts</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The number of attempts (default: <literal>6</literal>) will be made to reconnect to an unreachable
|
||||
upstream node before initiating a failover.
|
||||
</para>
|
||||
<para>
|
||||
There will be an interval of <option>reconnect_interval</option> seconds between each reconnection
|
||||
attempt.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<para>
|
||||
The number of attempts (default: <literal>6</literal>) will be made to reconnect to an unreachable
|
||||
upstream node before initiating a failover.
|
||||
</para>
|
||||
<para>
|
||||
There will be an interval of <option>reconnect_interval</option> seconds between each reconnection
|
||||
attempt.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>reconnect_interval</option></term>
|
||||
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>reconnect_interval</primary>
|
||||
</indexterm>
|
||||
<term><option>reconnect_interval</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Interval (in seconds, default: <literal>10</literal>) between attempts to reconnect to an unreachable
|
||||
upstream node.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
<para>
|
||||
Interval (in seconds, default: <literal>10</literal>) between attempts to reconnect to an unreachable
|
||||
upstream node.
|
||||
</para>
|
||||
<para>
|
||||
The number of reconnection attempts is defined by the parameter <option>reconnect_attempts</option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>degraded_monitoring_timeout</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>degraded_monitoring_timeout</primary>
|
||||
</indexterm>
|
||||
<term><option>degraded_monitoring_timeout</option></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Interval (in seconds) after which &repmgrd; will terminate if
|
||||
either of the servers (local node and or upstream node) being monitored is no longer available
|
||||
(<link linkend="repmgrd-degraded-monitoring">degraded monitoring mode</link>).
|
||||
</para>
|
||||
<para>
|
||||
<literal>-1</literal> (default) disables this timeout completely.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<para>
|
||||
Interval (in seconds) after which &repmgrd; will terminate if
|
||||
either of the servers (local node and or upstream node) being monitored is no longer available
|
||||
(<link linkend="repmgrd-degraded-monitoring">degraded monitoring mode</link>).
|
||||
</para>
|
||||
<para>
|
||||
<literal>-1</literal> (default) disables this timeout completely.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
@@ -182,11 +185,12 @@
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>failover</primary>
|
||||
</indexterm>
|
||||
<term><option>failover</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>failover</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
<option>failover</option> can be one of <literal>automatic</literal> or <literal>manual</literal>.
|
||||
</para>
|
||||
@@ -202,11 +206,13 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>promote_command</primary>
|
||||
</indexterm>
|
||||
<term><option>promote_command</option></term>
|
||||
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>promote_command</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The program or script defined in <option>promote_command</option> will be executed
|
||||
in a failover situation when &repmgrd; determines that
|
||||
@@ -245,11 +251,12 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>follow_command</primary>
|
||||
</indexterm>
|
||||
<term><option>follow_command</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>follow_command</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The program or script defined in <option>follow_command</option> will be executed
|
||||
in a failover situation when &repmgrd; determines that
|
||||
@@ -312,11 +319,12 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>priority</primary>
|
||||
</indexterm>
|
||||
<term><option>priority</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>priority</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
Indicates a preferred priority (default: <literal>100</literal>) for promoting nodes;
|
||||
a value of zero prevents the node being promoted to primary.
|
||||
@@ -330,11 +338,12 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>failover_validation_command</primary>
|
||||
</indexterm>
|
||||
<term><option>failover_validation_command</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>failover_validation_command</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
User-defined script to execute for an external mechanism to validate the failover
|
||||
decision made by &repmgrd;.
|
||||
@@ -366,12 +375,13 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>primary_visibility_consensus</primary>
|
||||
</indexterm>
|
||||
<term><option>primary_visibility_consensus</option></term>
|
||||
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>primary_visibility_consensus</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If <literal>true</literal>, only continue with failover if no standbys have seen
|
||||
the primary node recently.
|
||||
@@ -387,11 +397,12 @@
|
||||
|
||||
<varlistentry>
|
||||
|
||||
<indexterm>
|
||||
<primary>standby_disconnect_on_failover</primary>
|
||||
</indexterm>
|
||||
<term><option>standby_disconnect_on_failover</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>standby_disconnect_on_failover</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
In a failover situation, disconnect the local node's WAL receiver.
|
||||
</para>
|
||||
@@ -429,11 +440,12 @@
|
||||
<variablelist>
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>election_rerun_interval</primary>
|
||||
</indexterm>
|
||||
<term><option>election_rerun_interval</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>election_rerun_interval</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If <option>failover_validation_command</option> is set, and the command returns
|
||||
an error, pause the specified amount of seconds (default: 15) before rerunning the election.
|
||||
@@ -443,11 +455,12 @@
|
||||
|
||||
|
||||
<varlistentry>
|
||||
<indexterm>
|
||||
<primary>sibling_nodes_disconnect_timeout</primary>
|
||||
</indexterm>
|
||||
<term><option>sibling_nodes_disconnect_timeout</option></term>
|
||||
<listitem>
|
||||
<indexterm>
|
||||
<primary>sibling_nodes_disconnect_timeout</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
If <option>standby_disconnect_on_failover</option> is <literal>true</literal>, the
|
||||
maximum length of time (in seconds, default: <literal>30</literal>)
|
||||
@@ -463,11 +476,12 @@
|
||||
</sect2>
|
||||
|
||||
<sect2 id="postgresql-service-configuration">
|
||||
<title>PostgreSQL service configuration</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>PostgreSQL service configuration</secondary>
|
||||
</indexterm>
|
||||
<title>PostgreSQL service configuration</title>
|
||||
<para>
|
||||
If using automatic failover, currently &repmgrd; will need to execute
|
||||
<link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>
|
||||
@@ -481,16 +495,17 @@
|
||||
particularly on <application>systemd</application>-based systems.
|
||||
</para>
|
||||
<para>
|
||||
For more details, see <xref linkend="configuration-file-service-commands">.
|
||||
For more details, see <xref linkend="configuration-file-service-commands"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="repmgrd-service-configuration">
|
||||
<title>repmgrd service configuration</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>repmgrd service configuration</secondary>
|
||||
</indexterm>
|
||||
<title>repmgrd service configuration</title>
|
||||
<para>
|
||||
If you are intending to use the <link linkend="repmgr-daemon-start"><command>repmgr daemon start</command></link>
|
||||
and <link linkend="repmgr-daemon-stop"><command>repmgr daemon stop</command></link> commands, the following
|
||||
@@ -522,11 +537,12 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
|
||||
|
||||
<sect2 id="repmgrd-monitoring-configuration" xreflabel="repmgrd monitoring configuration">
|
||||
<title>Monitoring configuration</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>monitoring configuration</secondary>
|
||||
</indexterm>
|
||||
<title>Monitoring configuration</title>
|
||||
<para>
|
||||
To enable monitoring, set:
|
||||
<programlisting>
|
||||
@@ -538,20 +554,21 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
the option <option>monitor_interval_secs</option> (see above).
|
||||
</para>
|
||||
<para>
|
||||
For more details on monitoring, see <xref linkend="repmgrd-monitoring">.
|
||||
For more details on monitoring, see <xref linkend="repmgrd-monitoring"/>.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="repmgrd-reloading-configuration"xreflabel="reloading repmgrd configuration">
|
||||
<sect2 id="repmgrd-reloading-configuration" xreflabel="reloading repmgrd configuration">
|
||||
<title>Applying configuration changes to repmgrd</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>applying configuration changes</secondary>
|
||||
</indexterm>
|
||||
<title>Applying configuration changes to repmgrd</title>
|
||||
<para>
|
||||
To apply configuration file changes to a running &repmgrd;
|
||||
daemon, execute the operating system's &repmgrd; service reload command
|
||||
(see <xref linkend="appendix-packages"> for examples),
|
||||
(see <xref linkend="appendix-packages"/> for examples),
|
||||
or for instances which were manually started, execute <command>kill -HUP</command>, e.g.
|
||||
<command>kill -HUP `cat /tmp/repmgrd.pid`</command>.
|
||||
</para>
|
||||
@@ -779,18 +796,19 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-daemon" xreflabel="repmgrd daemon">
|
||||
<title>repmgrd daemon</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>starting and stopping</secondary>
|
||||
</indexterm>
|
||||
<title>repmgrd daemon</title>
|
||||
<para>
|
||||
If installed from a package, the &repmgrd; can be started
|
||||
via the operating system's service command, e.g. in <application>systemd</application>
|
||||
using <command>systemctl</command>.
|
||||
</para>
|
||||
<para>
|
||||
See appendix <xref linkend="appendix-packages"> for details of service commands
|
||||
See appendix <xref linkend="appendix-packages"/> for details of service commands
|
||||
for different distributions.
|
||||
</para>
|
||||
<para>
|
||||
@@ -815,6 +833,8 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
</para>
|
||||
|
||||
<sect2 id="repmgrd-pid-file" xreflabel="repmgrd's PID file">
|
||||
<title>repmgrd's PID file</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>PID file</secondary>
|
||||
@@ -823,7 +843,6 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
<primary>PID file</primary>
|
||||
<secondary>repmgrd</secondary>
|
||||
</indexterm>
|
||||
<title>repmgrd's PID file</title>
|
||||
<para>
|
||||
&repmgrd; will generate a PID file by default.
|
||||
</para>
|
||||
@@ -868,6 +887,8 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
</sect2>
|
||||
|
||||
<sect2 id="repmgrd-configuration-debian-ubuntu">
|
||||
<title>repmgrd daemon configuration on Debian/Ubuntu</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>Debian/Ubuntu and daemon configuration</secondary>
|
||||
@@ -877,8 +898,6 @@ repmgrd_service_stop_command='sudo systemctl repmgr11 stop'
|
||||
<secondary>repmgrd daemon configuration</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd daemon configuration on Debian/Ubuntu</title>
|
||||
|
||||
<para>
|
||||
If &repmgr; was installed from Debian/Ubuntu packages, additional configuration
|
||||
is required before &repmgrd; is started as a daemon.
|
||||
@@ -915,7 +934,7 @@ REPMGRD_OPTS="--daemonize=false"
|
||||
</para>
|
||||
<tip>
|
||||
<para>
|
||||
See <xref linkend="packages-debian-ubuntu"> for details of the Debian/Ubuntu packages and
|
||||
See <xref linkend="packages-debian-ubuntu"/> for details of the Debian/Ubuntu packages and
|
||||
typical file locations (including <filename>repmgr.conf</filename>).
|
||||
</para>
|
||||
</tip>
|
||||
@@ -959,7 +978,9 @@ REPMGRD_OPTS="--daemonize=false"
|
||||
|
||||
|
||||
|
||||
<sect1 id="repmgrd-log-rotation">
|
||||
<sect1 id="repmgrd-log-rotation">
|
||||
<title>repmgrd log rotation</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>log rotation</primary>
|
||||
<secondary>repmgrd</secondary>
|
||||
@@ -970,7 +991,6 @@ REPMGRD_OPTS="--daemonize=false"
|
||||
<secondary>log rotation</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd log rotation</title>
|
||||
<para>
|
||||
To ensure the current &repmgrd; logfile
|
||||
(specified in <filename>repmgr.conf</filename> with the parameter
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<chapter id="repmgrd-operation" xreflabel="repmgrd operation">
|
||||
<title>repmgrd operation</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>operation</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd operation</title>
|
||||
|
||||
|
||||
<sect1 id="repmgrd-pausing">
|
||||
|
||||
<title>Pausing repmgrd</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>pausing</secondary>
|
||||
@@ -18,7 +19,6 @@
|
||||
<primary>pausing repmgrd</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Pausing repmgrd</title>
|
||||
|
||||
<para>
|
||||
In normal operation, &repmgrd; monitors the state of the
|
||||
@@ -185,12 +185,13 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-wal-replay-pause">
|
||||
<title>repmgrd and paused WAL replay</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>paused WAL replay</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd and paused WAL replay</title>
|
||||
<para>
|
||||
If WAL replay has been paused (using <command>pg_wal_replay_pause()</command>,
|
||||
on PostgreSQL 9.6 and earlier <command>pg_xlog_replay_pause()</command>),
|
||||
@@ -214,6 +215,8 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="repmgrd-degraded-monitoring" xreflabel="repmgrd degraded monitoring">
|
||||
<title>"degraded monitoring" mode</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>degraded monitoring</secondary>
|
||||
@@ -223,7 +226,6 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<primary>degraded monitoring</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>"degraded monitoring" mode</title>
|
||||
<para>
|
||||
In certain circumstances, &repmgrd; is not able to fulfill its primary mission
|
||||
of monitoring the node's upstream server. In these cases it enters "degraded monitoring"
|
||||
@@ -302,6 +304,7 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
|
||||
|
||||
<sect1 id="repmgrd-monitoring" xreflabel="Storing monitoring data">
|
||||
<title>Storing monitoring data</title>
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>monitoring</secondary>
|
||||
@@ -311,7 +314,6 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<secondary>with repmgrd</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Storing monitoring data</title>
|
||||
<para>
|
||||
When &repmgrd; is running with the option <literal>monitoring_history=true</literal>,
|
||||
it will constantly write standby node status information to the
|
||||
@@ -346,7 +348,7 @@ NOTICE: node 3 (node3) unpaused</programlisting>
|
||||
<para>
|
||||
As this can generate a large amount of monitoring data in the table
|
||||
<literal>repmgr.monitoring_history</literal>. it's advisable to regularly
|
||||
purge historical data using the <xref linkend="repmgr-cluster-cleanup">
|
||||
purge historical data using the <xref linkend="repmgr-cluster-cleanup"/>
|
||||
command; use the <literal>-k/--keep-history</literal> option to
|
||||
specify how many day's worth of data should be retained.
|
||||
</para>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<chapter id="repmgrd-overview" xreflabel="repmgrd overview">
|
||||
<title>repmgrd overview</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>repmgrd</primary>
|
||||
<secondary>overview</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>repmgrd overview</title>
|
||||
|
||||
<para>
|
||||
&repmgrd; ("<literal>replication manager daemon</literal>")
|
||||
is a management and monitoring daemon which runs
|
||||
|
||||
89
doc/stylesheet-common.xsl
Normal file
89
doc/stylesheet-common.xsl
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
This file contains XSLT stylesheet customizations that are common to
|
||||
all output formats (HTML, HTML Help, XSL-FO, etc.).
|
||||
-->
|
||||
|
||||
<xsl:include href="stylesheet-speedup-common.xsl" />
|
||||
|
||||
<!-- Parameters -->
|
||||
|
||||
<!--
|
||||
<xsl:param name="draft.mode">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($repmgr.version, 'devel')">yes</xsl:when>
|
||||
<xsl:otherwise>no</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
-->
|
||||
|
||||
<xsl:param name="show.comments">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($repmgr.version, 'devel')">1</xsl:when>
|
||||
<xsl:otherwise>0</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:param name="callout.graphics" select="'0'"></xsl:param>
|
||||
<xsl:param name="toc.section.depth">2</xsl:param>
|
||||
<xsl:param name="linenumbering.extension" select="'0'"></xsl:param>
|
||||
<xsl:param name="section.autolabel" select="1"></xsl:param>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"></xsl:param>
|
||||
<xsl:param name="refentry.generate.name" select="0"></xsl:param>
|
||||
<xsl:param name="refentry.generate.title" select="1"></xsl:param>
|
||||
<xsl:param name="refentry.xref.manvolnum" select="0"/>
|
||||
<xsl:param name="formal.procedures" select="0"></xsl:param>
|
||||
<xsl:param name="generate.consistent.ids" select="1"/>
|
||||
<xsl:param name="punct.honorific" select="''"></xsl:param>
|
||||
<xsl:param name="variablelist.term.break.after">1</xsl:param>
|
||||
<xsl:param name="variablelist.term.separator"></xsl:param>
|
||||
<xsl:param name="xref.with.number.and.title" select="0"></xsl:param>
|
||||
|
||||
|
||||
<!-- Change display of some elements -->
|
||||
|
||||
<xsl:template match="productname">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structfield">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="structname">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="symbol">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="systemitem">
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="token">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="type">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="programlisting/emphasis">
|
||||
<xsl:call-template name="inline.boldseq"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Special support for Tcl synopses -->
|
||||
|
||||
<xsl:template match="optional[@role='tcl']">
|
||||
<xsl:text>?</xsl:text>
|
||||
<xsl:call-template name="inline.charseq"/>
|
||||
<xsl:text>?</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
292
doc/stylesheet-html-common.xsl
Normal file
292
doc/stylesheet-html-common.xsl
Normal file
@@ -0,0 +1,292 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE xsl:stylesheet [
|
||||
<!ENTITY % common.entities SYSTEM "http://docbook.sourceforge.net/release/xsl/current/common/entities.ent">
|
||||
%common.entities;
|
||||
]>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<!--
|
||||
This file contains XSLT stylesheet customizations that are common to
|
||||
all HTML output variants (chunked and single-page).
|
||||
-->
|
||||
|
||||
<!-- Parameters -->
|
||||
<xsl:param name="make.valid.html" select="1"></xsl:param>
|
||||
<xsl:param name="generate.id.attributes" select="1"></xsl:param>
|
||||
<xsl:param name="make.graphic.viewport" select="0"/>
|
||||
<xsl:param name="link.mailto.url">pgsql-docs@lists.postgresql.org</xsl:param>
|
||||
<xsl:param name="toc.max.depth">2</xsl:param>
|
||||
|
||||
|
||||
<!-- Change display of some elements -->
|
||||
|
||||
<xsl:template match="command">
|
||||
<xsl:call-template name="inline.monoseq"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="confgroup" mode="bibliography.mode">
|
||||
<span>
|
||||
<xsl:call-template name="common.html.attributes"/>
|
||||
<xsl:call-template name="id.attribute"/>
|
||||
<xsl:apply-templates select="conftitle/text()" mode="bibliography.mode"/>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:apply-templates select="confdates/text()" mode="bibliography.mode"/>
|
||||
<xsl:copy-of select="$biblioentry.item.separator"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="isbn" mode="bibliography.mode">
|
||||
<span>
|
||||
<xsl:call-template name="common.html.attributes"/>
|
||||
<xsl:call-template name="id.attribute"/>
|
||||
<xsl:text>ISBN </xsl:text>
|
||||
<xsl:apply-templates mode="bibliography.mode"/>
|
||||
<xsl:copy-of select="$biblioentry.item.separator"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- table of contents configuration -->
|
||||
|
||||
<xsl:param name="generate.toc">
|
||||
appendix toc,title
|
||||
article/appendix nop
|
||||
article toc,title
|
||||
book toc,title
|
||||
chapter toc,title
|
||||
part toc,title
|
||||
preface toc,title
|
||||
qandadiv toc
|
||||
qandaset toc
|
||||
reference toc,title
|
||||
sect1 toc
|
||||
sect2 toc
|
||||
sect3 toc
|
||||
sect4 toc
|
||||
sect5 toc
|
||||
section toc
|
||||
set toc,title
|
||||
</xsl:param>
|
||||
|
||||
<xsl:param name="generate.section.toc.level" select="1"></xsl:param>
|
||||
|
||||
<!-- include refentry under sect1 in tocs -->
|
||||
<xsl:template match="sect1" mode="toc">
|
||||
<xsl:param name="toc-context" select="."/>
|
||||
<xsl:call-template name="subtoc">
|
||||
<xsl:with-param name="toc-context" select="$toc-context"/>
|
||||
<xsl:with-param name="nodes" select="sect2|refentry
|
||||
|bridgehead[$bridgehead.in.toc != 0]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Put index "quicklinks" (A | B | C | ...) at the top of the bookindex page. -->
|
||||
|
||||
<!-- from html/autoidx.xsl -->
|
||||
|
||||
<xsl:template name="generate-basic-index">
|
||||
<xsl:param name="scope" select="NOTANODE"/>
|
||||
|
||||
<xsl:variable name="role">
|
||||
<xsl:if test="$index.on.role != 0">
|
||||
<xsl:value-of select="@role"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="type">
|
||||
<xsl:if test="$index.on.type != 0">
|
||||
<xsl:value-of select="@type"/>
|
||||
</xsl:if>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="terms"
|
||||
select="//indexterm
|
||||
[count(.|key('letter',
|
||||
translate(substring(&primary;, 1, 1),
|
||||
&lowercase;,
|
||||
&uppercase;))
|
||||
[&scope;][1]) = 1
|
||||
and not(@class = 'endofrange')]"/>
|
||||
|
||||
<xsl:variable name="alphabetical"
|
||||
select="$terms[contains(concat(&lowercase;, &uppercase;),
|
||||
substring(&primary;, 1, 1))]"/>
|
||||
|
||||
<xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
|
||||
&uppercase;),
|
||||
substring(&primary;, 1, 1)))]"/>
|
||||
|
||||
<div class="index">
|
||||
<!-- pgsql-docs: begin added stuff -->
|
||||
<p class="indexdiv-quicklinks">
|
||||
<a href="#indexdiv-Symbols">
|
||||
<xsl:call-template name="gentext">
|
||||
<xsl:with-param name="key" select="'index symbols'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
<xsl:apply-templates select="$alphabetical[count(.|key('letter',
|
||||
translate(substring(&primary;, 1, 1),
|
||||
&lowercase;,&uppercase;))[&scope;][1]) = 1]"
|
||||
mode="index-div-quicklinks">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||
</xsl:apply-templates>
|
||||
</p>
|
||||
<!-- pgsql-docs: end added stuff -->
|
||||
|
||||
<xsl:if test="$others">
|
||||
<xsl:choose>
|
||||
<xsl:when test="normalize-space($type) != '' and
|
||||
$others[@type = $type][count(.|key('primary', &primary;)[&scope;][1]) = 1]">
|
||||
<!-- pgsql-docs: added id attribute here for linking to it -->
|
||||
<div class="indexdiv" id="indexdiv-Symbols">
|
||||
<h3>
|
||||
<xsl:call-template name="gentext">
|
||||
<xsl:with-param name="key" select="'index symbols'"/>
|
||||
</xsl:call-template>
|
||||
</h3>
|
||||
<dl>
|
||||
<xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;][1]) = 1]"
|
||||
mode="index-symbol-div">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||
</xsl:apply-templates>
|
||||
</dl>
|
||||
</div>
|
||||
</xsl:when>
|
||||
<xsl:when test="normalize-space($type) != ''">
|
||||
<!-- Output nothing, as there isn't a match for $other using this $type -->
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- pgsql-docs: added id attribute here for linking to it -->
|
||||
<div class="indexdiv" id="indexdiv-Symbols">
|
||||
<h3>
|
||||
<xsl:call-template name="gentext">
|
||||
<xsl:with-param name="key" select="'index symbols'"/>
|
||||
</xsl:call-template>
|
||||
</h3>
|
||||
<dl>
|
||||
<xsl:apply-templates select="$others[count(.|key('primary',
|
||||
&primary;)[&scope;][1]) = 1]"
|
||||
mode="index-symbol-div">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||
</xsl:apply-templates>
|
||||
</dl>
|
||||
</div>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:apply-templates select="$alphabetical[count(.|key('letter',
|
||||
translate(substring(&primary;, 1, 1),
|
||||
&lowercase;,&uppercase;))[&scope;][1]) = 1]"
|
||||
mode="index-div-basic">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||
</xsl:apply-templates>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="indexterm" mode="index-div-basic">
|
||||
<xsl:param name="scope" select="."/>
|
||||
<xsl:param name="role" select="''"/>
|
||||
<xsl:param name="type" select="''"/>
|
||||
|
||||
<xsl:variable name="key"
|
||||
select="translate(substring(&primary;, 1, 1),
|
||||
&lowercase;,&uppercase;)"/>
|
||||
|
||||
<xsl:if test="key('letter', $key)[&scope;]
|
||||
[count(.|key('primary', &primary;)[&scope;][1]) = 1]">
|
||||
<div class="indexdiv">
|
||||
<!-- pgsql-docs: added id attribute here for linking to it -->
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="concat('indexdiv-', $key)"/>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
|
||||
<h3>
|
||||
<xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
|
||||
</h3>
|
||||
</xsl:if>
|
||||
<dl>
|
||||
<xsl:apply-templates select="key('letter', $key)[&scope;]
|
||||
[count(.|key('primary', &primary;)
|
||||
[&scope;][1])=1]"
|
||||
mode="index-primary">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
|
||||
</xsl:apply-templates>
|
||||
</dl>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<!-- pgsql-docs -->
|
||||
<xsl:template match="indexterm" mode="index-div-quicklinks">
|
||||
<xsl:param name="scope" select="."/>
|
||||
<xsl:param name="role" select="''"/>
|
||||
<xsl:param name="type" select="''"/>
|
||||
|
||||
<xsl:variable name="key"
|
||||
select="translate(substring(&primary;, 1, 1),
|
||||
&lowercase;,&uppercase;)"/>
|
||||
|
||||
<xsl:if test="key('letter', $key)[&scope;]
|
||||
[count(.|key('primary', &primary;)[&scope;][1]) = 1]">
|
||||
<xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
|
||||
|
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat('#indexdiv-', $key)"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- upper case HTML anchors for backward compatibility -->
|
||||
|
||||
<xsl:template name="object.id">
|
||||
<xsl:param name="object" select="."/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$object/@id">
|
||||
<xsl:value-of select="translate($object/@id, &lowercase;, &uppercase;)"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$object/@xml:id">
|
||||
<xsl:value-of select="$object/@xml:id"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$generate.consistent.ids != 0">
|
||||
<!-- Make $object the current node -->
|
||||
<xsl:for-each select="$object">
|
||||
<xsl:text>id-</xsl:text>
|
||||
<xsl:number level="multiple" count="*"/>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="generate-id($object)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
100
doc/stylesheet-speedup-common.xsl
Normal file
100
doc/stylesheet-speedup-common.xsl
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version='1.0'>
|
||||
|
||||
<!-- Performance-optimized versions of some upstream templates from common/
|
||||
directory -->
|
||||
|
||||
<!-- from common/labels.xsl -->
|
||||
|
||||
<xsl:template match="chapter" mode="label.markup">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@label">
|
||||
<xsl:value-of select="@label"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string($chapter.autolabel) != 0">
|
||||
<xsl:if test="$component.label.includes.part.label != 0 and
|
||||
ancestor::part">
|
||||
<xsl:variable name="part.label">
|
||||
<xsl:apply-templates select="ancestor::part"
|
||||
mode="label.markup"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$part.label != ''">
|
||||
<xsl:value-of select="$part.label"/>
|
||||
<xsl:apply-templates select="ancestor::part"
|
||||
mode="intralabel.punctuation">
|
||||
<xsl:with-param name="object" select="."/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:variable name="format">
|
||||
<xsl:call-template name="autolabel.format">
|
||||
<xsl:with-param name="format" select="$chapter.autolabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$label.from.part != 0 and ancestor::part">
|
||||
<xsl:number from="part" count="chapter" format="{$format}" level="any"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Optimization for pgsql-docs: When counting to get label for
|
||||
this chapter, preceding chapters can only be our siblings or
|
||||
children of a preceding part, so only count those instead of
|
||||
scanning the entire node tree. -->
|
||||
<!-- <xsl:number from="book" count="chapter" format="{$format}" level="any"/> -->
|
||||
<xsl:number value="count(../preceding-sibling::part/chapter) + count(preceding-sibling::chapter) + 1" format="{$format}"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="appendix" mode="label.markup">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@label">
|
||||
<xsl:value-of select="@label"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="string($appendix.autolabel) != 0">
|
||||
<xsl:if test="$component.label.includes.part.label != 0 and
|
||||
ancestor::part">
|
||||
<xsl:variable name="part.label">
|
||||
<xsl:apply-templates select="ancestor::part"
|
||||
mode="label.markup"/>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$part.label != ''">
|
||||
<xsl:value-of select="$part.label"/>
|
||||
<xsl:apply-templates select="ancestor::part"
|
||||
mode="intralabel.punctuation">
|
||||
<xsl:with-param name="object" select="."/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
<xsl:variable name="format">
|
||||
<xsl:call-template name="autolabel.format">
|
||||
<xsl:with-param name="format" select="$appendix.autolabel"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$label.from.part != 0 and ancestor::part">
|
||||
<xsl:number from="part" count="appendix" format="{$format}" level="any"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<!-- Optimization for pgsql-docs: When counting to get label for
|
||||
this appendix, preceding appendixes can only be our siblings or
|
||||
children of a preceding part, so only count those instead of
|
||||
scanning the entire node tree. -->
|
||||
<!-- <xsl:number from="book|article" count="appendix" format="{$format}" level="any"/> -->
|
||||
<xsl:number value="count(../preceding-sibling::part/appendix) + count(preceding-sibling::appendix) + 1" format="{$format}"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- from common/l10n.xsl -->
|
||||
|
||||
<!-- Just hardcode the language for the whole document, to make it faster. -->
|
||||
|
||||
<xsl:template name="l10n.language">en</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
345
doc/stylesheet-speedup-xhtml.xsl
Normal file
345
doc/stylesheet-speedup-xhtml.xsl
Normal file
@@ -0,0 +1,345 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
version='1.0'>
|
||||
|
||||
<!-- Performance-optimized versions of some upstream templates from xhtml/
|
||||
directory -->
|
||||
|
||||
<!-- from xhtml/autoidx.xsl -->
|
||||
|
||||
<xsl:template match="indexterm" mode="reference">
|
||||
<xsl:param name="scope" select="."/>
|
||||
<xsl:param name="role" select="''"/>
|
||||
<xsl:param name="type" select="''"/>
|
||||
<xsl:param name="position"/>
|
||||
<xsl:param name="separator" select="''"/>
|
||||
|
||||
<xsl:variable name="term.separator">
|
||||
<xsl:call-template name="index.separator">
|
||||
<xsl:with-param name="key" select="'index.term.separator'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="number.separator">
|
||||
<xsl:call-template name="index.separator">
|
||||
<xsl:with-param name="key" select="'index.number.separator'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="range.separator">
|
||||
<xsl:call-template name="index.separator">
|
||||
<xsl:with-param name="key" select="'index.range.separator'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$separator != ''">
|
||||
<xsl:value-of select="$separator"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$position = 1">
|
||||
<xsl:value-of select="$term.separator"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$number.separator"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="@zone and string(@zone)">
|
||||
<xsl:call-template name="reference">
|
||||
<xsl:with-param name="zones" select="normalize-space(@zone)"/>
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a>
|
||||
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||
<xsl:variable name="title">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$index.prefer.titleabbrev != 0">
|
||||
<xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="titleabbrev.markup"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]" mode="title.markup"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:attribute name="href">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$index.links.to.section = 1">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="(ancestor-or-self::set|ancestor-or-self::book|ancestor-or-self::part|ancestor-or-self::reference|ancestor-or-self::partintro|ancestor-or-self::chapter|ancestor-or-self::appendix|ancestor-or-self::preface|ancestor-or-self::article|ancestor-or-self::section|ancestor-or-self::sect1|ancestor-or-self::sect2|ancestor-or-self::sect3|ancestor-or-self::sect4|ancestor-or-self::sect5|ancestor-or-self::refentry|ancestor-or-self::refsect1|ancestor-or-self::refsect2|ancestor-or-self::refsect3|ancestor-or-self::simplesect|ancestor-or-self::bibliography|ancestor-or-self::glossary|ancestor-or-self::index|ancestor-or-self::webpage|ancestor-or-self::topic)[last()]"/>
|
||||
<!-- Optimization for pgsql-docs: We only have an index as a
|
||||
child of book, so look that up directly instead of
|
||||
scanning the entire node tree. Also, don't look for
|
||||
setindex. -->
|
||||
<!-- <xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/> -->
|
||||
<xsl:with-param name="context" select="(/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="."/>
|
||||
<xsl:with-param name="context" select="(//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))] | //setindex[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))])[1]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:value-of select="$title"/> <!-- text only -->
|
||||
</a>
|
||||
|
||||
<xsl:variable name="id" select="(@id|@xml:id)[1]"/>
|
||||
<xsl:if test="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))]">
|
||||
<xsl:apply-templates select="key('endofrange', $id)[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][last()]" mode="reference">
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
<xsl:with-param name="separator" select="$range.separator"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="reference">
|
||||
<xsl:param name="scope" select="."/>
|
||||
<xsl:param name="role" select="''"/>
|
||||
<xsl:param name="type" select="''"/>
|
||||
<xsl:param name="zones"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($zones, ' ')">
|
||||
<xsl:variable name="zone" select="substring-before($zones, ' ')"/>
|
||||
<xsl:variable name="target" select="key('sections', $zone)"/>
|
||||
|
||||
<a>
|
||||
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||
<!-- Optimization for pgsql-docs: this call adds nothing but fails with docbook-xsl 1.76 -->
|
||||
<!-- <xsl:call-template name="id.attribute"/> -->
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$target[1]"/>
|
||||
<xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="$target[1]" mode="index-title-content"/>
|
||||
</a>
|
||||
<xsl:text>, </xsl:text>
|
||||
<xsl:call-template name="reference">
|
||||
<xsl:with-param name="zones" select="substring-after($zones, ' ')"/>
|
||||
<xsl:with-param name="position" select="position()"/>
|
||||
<xsl:with-param name="scope" select="$scope"/>
|
||||
<xsl:with-param name="role" select="$role"/>
|
||||
<xsl:with-param name="type" select="$type"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="zone" select="$zones"/>
|
||||
<xsl:variable name="target" select="key('sections', $zone)"/>
|
||||
|
||||
<a>
|
||||
<xsl:apply-templates select="." mode="class.attribute"/>
|
||||
<!-- Optimization for pgsql-docs: this call adds nothing but fails with docbook-xsl 1.76 -->
|
||||
<!-- <xsl:call-template name="id.attribute"/> -->
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$target[1]"/>
|
||||
<!-- Optimization for pgsql-docs: Only look for index under book
|
||||
instead of searching the whole node tree. -->
|
||||
<!-- <xsl:with-param name="context" select="//index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/> -->
|
||||
<xsl:with-param name="context" select="/book/index[count(ancestor::node()|$scope) = count(ancestor::node()) and ($role = @role or $type = @type or (string-length($role) = 0 and string-length($type) = 0))][1]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:apply-templates select="$target[1]" mode="index-title-content"/>
|
||||
</a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- from xhtml/chunk-common.xsl -->
|
||||
|
||||
<xsl:template name="chunk-all-sections">
|
||||
<xsl:param name="content">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:param>
|
||||
|
||||
<!-- Optimization for pgsql-docs: Since we set a fixed $chunk.section.depth,
|
||||
we can do away with a bunch of complicated XPath searches for the
|
||||
previous and next sections at various levels. -->
|
||||
|
||||
<xsl:if test="$chunk.section.depth != 1">
|
||||
<xsl:message terminate="yes">
|
||||
<xsl:text>Error: If you change $chunk.section.depth, then you must update the performance-optimized chunk-all-sections-template.</xsl:text>
|
||||
</xsl:message>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="prev"
|
||||
select="(preceding::book[1]
|
||||
|preceding::preface[1]
|
||||
|preceding::chapter[1]
|
||||
|preceding::appendix[1]
|
||||
|preceding::part[1]
|
||||
|preceding::reference[1]
|
||||
|preceding::refentry[1]
|
||||
|preceding::colophon[1]
|
||||
|preceding::article[1]
|
||||
|preceding::topic[1]
|
||||
|preceding::bibliography[parent::article or parent::book or parent::part][1]
|
||||
|preceding::glossary[parent::article or parent::book or parent::part][1]
|
||||
|preceding::index[$generate.index != 0]
|
||||
[parent::article or parent::book or parent::part][1]
|
||||
|preceding::setindex[$generate.index != 0][1]
|
||||
|ancestor::set
|
||||
|ancestor::book[1]
|
||||
|ancestor::preface[1]
|
||||
|ancestor::chapter[1]
|
||||
|ancestor::appendix[1]
|
||||
|ancestor::part[1]
|
||||
|ancestor::reference[1]
|
||||
|ancestor::article[1]
|
||||
|ancestor::topic[1]
|
||||
|preceding::sect1[1]
|
||||
|ancestor::sect1[1])[last()]"/>
|
||||
|
||||
<xsl:variable name="next"
|
||||
select="(following::book[1]
|
||||
|following::preface[1]
|
||||
|following::chapter[1]
|
||||
|following::appendix[1]
|
||||
|following::part[1]
|
||||
|following::reference[1]
|
||||
|following::refentry[1]
|
||||
|following::colophon[1]
|
||||
|following::bibliography[parent::article or parent::book or parent::part][1]
|
||||
|following::glossary[parent::article or parent::book or parent::part][1]
|
||||
|following::index[$generate.index != 0]
|
||||
[parent::article or parent::book][1]
|
||||
|following::article[1]
|
||||
|following::topic[1]
|
||||
|following::setindex[$generate.index != 0][1]
|
||||
|descendant::book[1]
|
||||
|descendant::preface[1]
|
||||
|descendant::chapter[1]
|
||||
|descendant::appendix[1]
|
||||
|descendant::article[1]
|
||||
|descendant::topic[1]
|
||||
|descendant::bibliography[parent::article or parent::book][1]
|
||||
|descendant::glossary[parent::article or parent::book or parent::part][1]
|
||||
|descendant::index[$generate.index != 0]
|
||||
[parent::article or parent::book][1]
|
||||
|descendant::colophon[1]
|
||||
|descendant::setindex[$generate.index != 0][1]
|
||||
|descendant::part[1]
|
||||
|descendant::reference[1]
|
||||
|descendant::refentry[1]
|
||||
|following::sect1[1]
|
||||
|descendant::sect1[1])[1]"/>
|
||||
|
||||
<xsl:call-template name="process-chunk">
|
||||
<xsl:with-param name="prev" select="$prev"/>
|
||||
<xsl:with-param name="next" select="$next"/>
|
||||
<xsl:with-param name="content" select="$content"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="href.target">
|
||||
<xsl:param name="context" select="."/>
|
||||
<xsl:param name="object" select="."/>
|
||||
<xsl:param name="toc-context" select="."/>
|
||||
<!-- Optimization for pgsql-docs: Remove support for dbhtml processing
|
||||
instruction here -->
|
||||
<xsl:variable name="href.to.uri">
|
||||
<xsl:call-template name="href.target.uri">
|
||||
<xsl:with-param name="object" select="$object"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href.from.uri">
|
||||
<xsl:choose>
|
||||
<xsl:when test="not($toc-context = .)">
|
||||
<xsl:call-template name="href.target.uri">
|
||||
<xsl:with-param name="object" select="$toc-context"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:call-template name="href.target.uri">
|
||||
<xsl:with-param name="object" select="$context"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href.to">
|
||||
<xsl:value-of select="$href.to.uri"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href.from">
|
||||
<xsl:call-template name="trim.common.uri.paths">
|
||||
<xsl:with-param name="uriA" select="$href.to.uri"/>
|
||||
<xsl:with-param name="uriB" select="$href.from.uri"/>
|
||||
<xsl:with-param name="return" select="'B'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="depth">
|
||||
<xsl:call-template name="count.uri.path.depth">
|
||||
<xsl:with-param name="filename" select="$href.from"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="href">
|
||||
<xsl:call-template name="copy-string">
|
||||
<xsl:with-param name="string" select="'../'"/>
|
||||
<xsl:with-param name="count" select="$depth"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$href.to"/>
|
||||
</xsl:variable>
|
||||
<xsl:value-of select="$href"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="html.head">
|
||||
<xsl:param name="prev" select="/foo"/>
|
||||
<xsl:param name="next" select="/foo"/>
|
||||
|
||||
<!-- Optimization for pgsql-docs: Cut out a bunch of things we don't need
|
||||
here, including an expensive //legalnotice search. -->
|
||||
|
||||
<head>
|
||||
<xsl:call-template name="system.head.content"/>
|
||||
<xsl:call-template name="head.content"/>
|
||||
|
||||
<xsl:if test="$prev">
|
||||
<link rel="prev">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$prev"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$prev" mode="object.title.markup.textonly"/>
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$next">
|
||||
<link rel="next">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$next"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$next" mode="object.title.markup.textonly"/>
|
||||
</xsl:attribute>
|
||||
</link>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:call-template name="user.head.content"/>
|
||||
</head>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
174
doc/stylesheet.xsl
Normal file
174
doc/stylesheet.xsl
Normal file
@@ -0,0 +1,174 @@
|
||||
<?xml version='1.0'?>
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version='1.0'
|
||||
xmlns="http://www.w3.org/TR/xhtml1/transitional"
|
||||
exclude-result-prefixes="#default">
|
||||
|
||||
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
|
||||
<xsl:include href="stylesheet-common.xsl" />
|
||||
<xsl:include href="stylesheet-html-common.xsl" />
|
||||
<xsl:include href="stylesheet-speedup-xhtml.xsl" />
|
||||
|
||||
|
||||
<!-- Parameters -->
|
||||
<xsl:param name="base.dir" select="'html/'"></xsl:param>
|
||||
<xsl:param name="use.id.as.filename" select="'1'"></xsl:param>
|
||||
<xsl:param name="generate.legalnotice.link" select="1"></xsl:param>
|
||||
<xsl:param name="chunk.first.sections" select="1"/>
|
||||
<xsl:param name="chunk.quietly" select="1"></xsl:param>
|
||||
<xsl:param name="admon.style"></xsl:param> <!-- handled by CSS stylesheet -->
|
||||
|
||||
<xsl:param name="website.stylesheet" select="0"/>
|
||||
|
||||
<xsl:param name="html.stylesheet">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$website.stylesheet = 0">stylesheet.css</xsl:when>
|
||||
<xsl:otherwise>https://www.postgresql.org/media/css/docs.css</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:param>
|
||||
|
||||
|
||||
<!-- strip directory name from image filerefs -->
|
||||
<xsl:template match="imagedata/@fileref">
|
||||
<xsl:value-of select="substring-after(., '/')"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!--
|
||||
Customization of header
|
||||
- add Up and Home links
|
||||
- add tool tips to links
|
||||
|
||||
(overrides html/chunk-common.xsl)
|
||||
-->
|
||||
<xsl:template name="header.navigation">
|
||||
<xsl:param name="prev" select="/foo"/>
|
||||
<xsl:param name="next" select="/foo"/>
|
||||
<xsl:param name="nav.context"/>
|
||||
|
||||
<xsl:variable name="home" select="/*[1]"/>
|
||||
<xsl:variable name="up" select="parent::*"/>
|
||||
|
||||
<xsl:variable name="row1" select="$navig.showtitles != 0"/>
|
||||
<xsl:variable name="row2" select="count($prev) > 0
|
||||
or (count($up) > 0
|
||||
and generate-id($up) != generate-id($home)
|
||||
and $navig.showtitles != 0)
|
||||
or count($next) > 0"/>
|
||||
|
||||
<xsl:if test="$suppress.navigation = '0' and $suppress.header.navigation = '0'">
|
||||
<div class="navheader">
|
||||
<xsl:if test="$row1 or $row2">
|
||||
<table width="100%" summary="Navigation header">
|
||||
<xsl:if test="$row1">
|
||||
<tr>
|
||||
<th colspan="5" align="center">
|
||||
<xsl:apply-templates select="." mode="object.title.markup"/>
|
||||
</th>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$row2">
|
||||
<tr>
|
||||
<td width="10%" align="{$direction.align.start}">
|
||||
<xsl:if test="count($prev)>0">
|
||||
<a accesskey="p">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$prev"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$prev" mode="object.title.markup"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'prev'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
<xsl:text> </xsl:text>
|
||||
</td>
|
||||
<td width="10%" align="{$direction.align.start}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($up)>0
|
||||
and generate-id($up) != generate-id($home)">
|
||||
<a accesskey="u">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$up"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$up" mode="object.title.markup"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'up'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise> </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<th width="60%" align="center">
|
||||
<xsl:choose>
|
||||
<xsl:when test="count($up) > 0
|
||||
and generate-id($up) != generate-id($home)
|
||||
and $navig.showtitles != 0">
|
||||
<xsl:apply-templates select="$up" mode="object.title.markup"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise> </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</th>
|
||||
<td width="10%" align="{$direction.align.end}">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$home != . or $nav.context = 'toc'">
|
||||
<a accesskey="h">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$home"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$home" mode="object.title.markup"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'home'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
<xsl:if test="$chunk.tocs.and.lots != 0 and $nav.context != 'toc'">
|
||||
<xsl:text> | </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise> </xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
<td width="10%" align="{$direction.align.end}">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:if test="count($next)>0">
|
||||
<a accesskey="n">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="href.target">
|
||||
<xsl:with-param name="object" select="$next"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="title">
|
||||
<xsl:apply-templates select="$next" mode="object.title.markup"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="navig.content">
|
||||
<xsl:with-param name="direction" select="'next'"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
</xsl:if>
|
||||
<xsl:if test="$header.rule != 0">
|
||||
<hr/>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -1,10 +1,10 @@
|
||||
<chapter id="performing-switchover" xreflabel="Performing a switchover with repmgr">
|
||||
<title>Performing a switchover with repmgr</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>switchover</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Performing a switchover with repmgr</title>
|
||||
<para>
|
||||
A typical use-case for replication is a combination of primary and standby
|
||||
server, with the standby serving as a backup which can easily be activated
|
||||
@@ -15,7 +15,7 @@
|
||||
<para>
|
||||
In some cases however it's desirable to promote the standby in a planned
|
||||
way, e.g. so maintenance can be performed on the primary; this kind of switchover
|
||||
is supported by the <xref linkend="repmgr-standby-switchover"> command.
|
||||
is supported by the <xref linkend="repmgr-standby-switchover"/> command.
|
||||
</para>
|
||||
<para>
|
||||
<command>repmgr standby switchover</command> differs from other &repmgr;
|
||||
@@ -44,17 +44,18 @@
|
||||
and capturing all output to assist troubleshooting any problems.
|
||||
</simpara>
|
||||
<simpara>
|
||||
Please also read carefully the sections <xref linkend="preparing-for-switchover"> and
|
||||
<xref linkend="switchover-caveats"> below.
|
||||
Please also read carefully the sections <xref linkend="preparing-for-switchover"/> and
|
||||
<xref linkend="switchover-caveats"/> below.
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
<sect1 id="preparing-for-switchover" xreflabel="Preparing for switchover">
|
||||
<title>Preparing for switchover</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>switchover</primary>
|
||||
<secondary>preparation</secondary>
|
||||
</indexterm>
|
||||
<title>Preparing for switchover</title>
|
||||
|
||||
<para>
|
||||
As mentioned in the previous section, success of the switchover operation depends on
|
||||
@@ -114,7 +115,7 @@
|
||||
server.
|
||||
</para>
|
||||
<para>
|
||||
For more details, see <xref linkend="configuration-file-service-commands">.
|
||||
For more details, see <xref linkend="configuration-file-service-commands"/>.
|
||||
</para>
|
||||
</important>
|
||||
|
||||
@@ -161,7 +162,7 @@
|
||||
From <link linkend="release-4.2">repmgr 4.2</link>, &repmgr; will instruct any running
|
||||
&repmgrd; instances to pause operations while the switchover
|
||||
is being carried out, to prevent &repmgrd; from
|
||||
unintentionally promoting a node. For more details, see <xref linkend="repmgrd-pausing">.
|
||||
unintentionally promoting a node. For more details, see <xref linkend="repmgrd-pausing"/>.
|
||||
</para>
|
||||
<para>
|
||||
Users of &repmgr; versions prior to 4.2 should ensure that &repmgrd;
|
||||
@@ -204,18 +205,19 @@
|
||||
|
||||
<note>
|
||||
<simpara>
|
||||
See <xref linkend="repmgr-standby-switchover"> for a full list of available
|
||||
See <xref linkend="repmgr-standby-switchover"/> for a full list of available
|
||||
command line options and <filename>repmgr.conf</filename> settings relevant
|
||||
to performing a switchover.
|
||||
</simpara>
|
||||
</note>
|
||||
|
||||
<sect2 id="switchover-pg-rewind" xreflabel="Switchover and pg_rewind">
|
||||
<sect2 id="switchover-pg-rewind" xreflabel="Switchover and pg_rewind">
|
||||
<title>Switchover and pg_rewind</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>pg_rewind</primary>
|
||||
<secondary>using with "repmgr standby switchover"</secondary>
|
||||
</indexterm>
|
||||
<title>Switchover and pg_rewind</title>
|
||||
<para>
|
||||
If the demotion candidate does not shut down smoothly or cleanly, there's a risk it
|
||||
will have a slightly divergent timeline and will not be able to attach to the new
|
||||
@@ -258,11 +260,12 @@
|
||||
</sect1>
|
||||
|
||||
<sect1 id="switchover-execution" xreflabel="Executing the switchover command">
|
||||
<title>Executing the switchover command</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>switchover</primary>
|
||||
<secondary>execution</secondary>
|
||||
</indexterm>
|
||||
<title>Executing the switchover command</title>
|
||||
<para>
|
||||
To demonstrate switchover, we will assume a replication cluster with a
|
||||
primary (<literal>node1</literal>) and one standby (<literal>node2</literal>);
|
||||
@@ -328,11 +331,11 @@
|
||||
|
||||
|
||||
<sect1 id="switchover-caveats" xreflabel="Caveats">
|
||||
<title>Caveats</title>
|
||||
<indexterm>
|
||||
<primary>switchover</primary>
|
||||
<secondary>caveats</secondary>
|
||||
</indexterm>
|
||||
<title>Caveats</title>
|
||||
<para>
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
<listitem>
|
||||
@@ -357,11 +360,12 @@
|
||||
</sect1>
|
||||
|
||||
<sect1 id="switchover-troubleshooting" xreflabel="Troubleshooting">
|
||||
<title>Troubleshooting switchover issues</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>switchover</primary>
|
||||
<secondary>troubleshooting</secondary>
|
||||
</indexterm>
|
||||
<title>Troubleshooting switchover issues</title>
|
||||
|
||||
<para>
|
||||
As <link linkend="performing-switchover">emphasised previously</link>, performing a switchover
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<chapter id="upgrading-repmgr" xreflabel="Upgrading repmgr">
|
||||
<title>Upgrading repmgr</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
</indexterm>
|
||||
|
||||
<title>Upgrading repmgr</title>
|
||||
|
||||
<para>
|
||||
&repmgr; is updated regularly with minor releases (e.g. 4.0.1 to 4.0.2)
|
||||
@@ -13,11 +13,12 @@
|
||||
</para>
|
||||
|
||||
<sect1 id="upgrading-repmgr-extension" xreflabel="Upgrading repmgr 4.x and later">
|
||||
<title>Upgrading repmgr 4.x and later</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>repmgr 4.x and later</secondary>
|
||||
</indexterm>
|
||||
<title>Upgrading repmgr 4.x and later</title>
|
||||
<para>
|
||||
From version 4, &repmgr; consists of three elements:
|
||||
<itemizedlist spacing="compact" mark="bullet">
|
||||
@@ -63,11 +64,12 @@
|
||||
</important>
|
||||
|
||||
<sect2 id="upgrading-minor-version" xreflabel="Upgrading a minor version release">
|
||||
<title>Upgrading a minor version release</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>minor release</secondary>
|
||||
</indexterm>
|
||||
<title>Upgrading a minor version release</title>
|
||||
|
||||
<para>
|
||||
The process for installing minor version upgrades is quite straightforward:
|
||||
@@ -118,11 +120,13 @@
|
||||
</sect2>
|
||||
|
||||
<sect2 id="upgrading-major-version" xreflabel="Upgrading a major version release">
|
||||
<title>Upgrading a major version release</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>major release</secondary>
|
||||
</indexterm>
|
||||
<title>Upgrading a major version release</title>
|
||||
|
||||
<para>
|
||||
"major version" upgrades need to be planned more carefully, as they may include
|
||||
changes to the &repmgr; metadata (which need to be propagated from the primary to all
|
||||
@@ -205,11 +209,12 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="upgrading-check-repmgrd" xreflabel="Checking repmgrd status after an upgrade">
|
||||
<title>Checking repmgrd status after an upgrade</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>checking repmgrd status</secondary>
|
||||
</indexterm>
|
||||
<title>Checking repmgrd status after an upgrade</title>
|
||||
<para>
|
||||
From <link linkend="release-4.2">repmgr 4.2</link>, once the upgrade is complete, execute the <command><link linkend="repmgr-daemon-status">repmgr daemon status</link></command>
|
||||
command (on any node) to show an overview of the status of &repmgrd; on all nodes.
|
||||
@@ -218,6 +223,8 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="upgrading-and-pg-upgrade" xreflabel="pg_upgrade and repmgr">
|
||||
<title>pg_upgrade and repmgr</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>pg_upgrade</secondary>
|
||||
@@ -225,7 +232,6 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
<indexterm>
|
||||
<primary>pg_upgrade</primary>
|
||||
</indexterm>
|
||||
<title>pg_upgrade and repmgr</title>
|
||||
|
||||
<para>
|
||||
<application>pg_upgrade</application> requires that if any functions are
|
||||
@@ -265,12 +271,13 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
|
||||
|
||||
<sect1 id="upgrading-from-repmgr-3" xreflabel="Upgrading from repmgr 3.x">
|
||||
<title>Upgrading from repmgr 3.x</title>
|
||||
|
||||
<indexterm>
|
||||
<primary>upgrading</primary>
|
||||
<secondary>from repmgr 3.x</secondary>
|
||||
</indexterm>
|
||||
|
||||
<title>Upgrading from repmgr 3.x</title>
|
||||
<para>
|
||||
The upgrade process consists of two steps:
|
||||
<orderedlist>
|
||||
@@ -383,7 +390,7 @@ ALTER EXTENSION repmgr UPDATE</programlisting>
|
||||
to the server configured in Barman (in &repmgr; 3, the deprecated
|
||||
<literal>cluster</literal> parameter was used for this);
|
||||
the physical Barman hostname is configured with
|
||||
<literal>barman_host</literal> (see <xref linkend="cloning-from-barman-prerequisites">
|
||||
<literal>barman_host</literal> (see <xref linkend="cloning-from-barman-prerequisites"/>
|
||||
for details).
|
||||
</para>
|
||||
</note>
|
||||
|
||||
Reference in New Issue
Block a user