diff --git a/doc/appendix-faq.sgml b/doc/appendix-faq.sgml
new file mode 100644
index 00000000..d2c3b2d5
--- /dev/null
+++ b/doc/appendix-faq.sgml
@@ -0,0 +1,228 @@
+
+ FAQ (Frequently Asked Questions)
+
+
+ General
+
+
+ What's the difference between the repmgr versions?
+
+ &repmgr; 4 is a complete rewrite of the existing &repmgr; code base
+ and implements &repmgr; as a PostgreSQL extension. It
+ supports all PostgreSQL versions from 9.3 (although some &repmgr;
+ features are not available for PostgreSQL 9.3 and 9.4).
+
+
+ &repmgr; 3.x builds on the improved replication facilities added
+ in PostgreSQL 9.3, as well as improved automated failover support
+ via repmgrd, and is not compatible with PostgreSQL 9.2
+ and earlier. We recommend upgrading to &repmgr; 4, as the &repmgr; 3.x
+ series will no longer be actively maintained.
+
+
+ repmgr 2.x supports PostgreSQL 9.0 ~ 9.3. While it is compatible
+ with PostgreSQL 9.3, we recommend using repmgr 4.x.
+
+
+
+
+ What's the advantage of using replication slots?
+
+ Replication slots, introduced in PostgreSQL 9.4, ensure that the
+ primary server will retain WAL files until they have been consumed
+ by all standby servers. This makes WAL file management much easier,
+ and if used `repmgr` will no longer insist on a fixed minimum number
+ (default: 5000) of WAL files being retained.
+
+
+ However this does mean that if a standby is no longer connected to the
+ primary, the presence of the replication slot will cause WAL files
+ to be retained indefinitely.
+
+
+
+
+ How many replication slots should I define in max_replication_slots?
+
+ Normally at least same number as the number of standbys which will connect
+ to the node. Note that changes to max_replication_slots require a server
+ restart to take effect, and as there is no particular penalty for unused
+ replication slots, setting a higher figure will make adding new nodes
+ easier.
+
+
+
+
+ Does &repmgr; support hash indexes?
+
+ Before PostgreSQL 10, hash indexes were not WAL logged and are therefore not suitable
+ for use in streaming replication in PostgreSQL 9.6 and earlier. See the
+ PostgreSQL documentation
+ for details.
+
+
+ From PostgreSQL 10, this restriction has been lifted and hash indexes can be used
+ in a streaming replication cluster.
+
+
+
+
+
+ repmgr
+
+
+ Can I register an existing PostgreSQL server with repmgr?
+
+ Yes, any existing PostgreSQL server which is part of the same replication
+ cluster can be registered with &repmgr;. There's no requirement for a
+ standby to have been cloned using &repmgr;.
+
+
+
+
+ How can a failed primary be re-added as a standby?
+
+ This is a two-stage process. First, the failed primary's data directory
+ must be re-synced with the current primary; secondly the failed primary
+ needs to be re-registered as a standby.
+
+
+ In PostgreSQL 9.5 and later, it's possible to use pg_rewind
+ to re-synchronise the existing data directory, which will usually be much
+ faster than re-cloning the server. However pg_rewind can only
+ be used if PostgreSQL either has wal_log_hints enabled, or
+ data checksums were enabled when the cluster was initialized.
+
+
+ &repmgr; provides the command repmgr node rejoin which can
+ optionally execute pg_rewind; see the
+ documentation for details.
+
+
+ If pg_rewind cannot be used, then the data directory will have
+ to be re-cloned from scratch.
+
+
+
+
+
+ Is there an easy way to check my primary server is correctly configured for use with &repmgr;?
+
+ Execute repmgr standby clone
+ with the --dry-run option; this will report any configuration problems
+ which need to be rectified.
+
+
+
+
+ When cloning a standby, how can I get &repmgr; to copy
+ postgresql.conf and pg_hba.conf from the PostgreSQL configuration
+ directory in /etc?
+
+ Use the command line option --copy-external-config-files. For more details
+ see .
+
+
+
+
+ Do I need to include shared_preload_libraries = 'repmgr'
+ in postgresql.conf if I'm not using repmgrd?
+
+ No, the repmgr shared library is only needed when running repmgrd.
+ If you later decide to run repmgrd, you just need to add
+ shared_preload_libraries = 'repmgr' and restart PostgreSQL.
+
+
+
+
+ I've provided replication permission for the repmgr user in pg_hba.conf
+ but repmgr/repmgrd complains it can't connect to the server... Why?
+
+ repmgr andrepmgrd need to be able to connect to the repmgr database
+ with a normal connection to query metadata. The replication connection
+ permission is for PostgreSQL's streaming replication (and doesn't necessarily need to be the repmgr user).
+
+
+
+
+ When cloning a standby, why do I need to provide the connection parameters
+ for the primary server on the command line, not in the configuration file?
+
+ Cloning a standby is a one-time action; the role of the server being cloned
+ from could change, so fixing it in the configuration file would create
+ confusion. If &repmgr; needs to establish a connection to the primary
+ server, it can retrieve this from the repmgr.nodes table or if necessary
+ scan the replication cluster until it locates the active primary.
+
+
+
+
+ Why is there no foreign key on the node_id column in the repmgr.events
+ table?
+
+ Under some circumstances event notifications can be generated for servers
+ which have not yet been registered; it's also useful to retain a record
+ of events which includes servers removed from the replication cluster
+ which no longer have an entry in the repmrg.nodes table.
+
+
+
+
+
+
+ repmgrd
+
+
+
+ How can I prevent a node from ever being promoted to primary?
+
+ In `repmgr.conf`, set its priority to a value of 0 or less; apply the changed setting with
+ repmgr standby register --force.
+
+
+ Additionally, if failover is set to manual, the node will never
+ be considered as a promotion candidate.
+
+
+
+
+ Does repmgrd support delayed standbys?
+
+ repmgrd can monitor delayed standbys - those set up with
+ recovery_min_apply_delay set to a non-zero value
+ in recovery.conf - but as it's not currently possible
+ to directly examine the value applied to the standby, repmgrd
+ may not be able to properly evaluate the node as a promotion candidate.
+
+
+ We recommend that delayed standbys are explicitly excluded from promotion
+ by setting priority to 0 in
+ repmgr.conf.
+
+
+ Note that after registering a delayed standby, repmgrd will only start
+ once the metadata added in the master node has been replicated.
+
+
+
+
+ How can I get repmgrd to rotate its logfile?
+
+ Configure your system's logrotate service to do this; see .
+
+
+
+
+
+ I've recloned a failed master as a standby, but repmgrd refuses to start?
+
+ Check you registered the standby after recloning. If unregistered, the standby
+ cannot be considered as a promotion candidate even if failover is set to
+ automatic, which is probably not what you want. repmgrd will start if
+ failover is set to manual so the node's replication status can still
+ be monitored, if desired.
+
+
+
+
+
diff --git a/doc/filelist.sgml b/doc/filelist.sgml
index 29fe40d3..4f8d6eed 100644
--- a/doc/filelist.sgml
+++ b/doc/filelist.sgml
@@ -71,6 +71,7 @@
+
diff --git a/doc/repmgr.sgml b/doc/repmgr.sgml
index ffa1baa0..1c1b903d 100644
--- a/doc/repmgr.sgml
+++ b/doc/repmgr.sgml
@@ -23,13 +23,13 @@
- Thisis the official documentation of &repmgr; &repmgrversion; for
+ This is the official documentation of &repmgr; &repmgrversion; for
use with PostgreSQL 9.3 - PostgreSQL 10.
It describes the functionality supported by the current version of &repmgr;.
- repmgr was developed by
+ &repmgr; was developed by
2ndQuadrant
along with contributions from other individuals and companies.
Contributions from the community are appreciated and welcome - get
@@ -109,6 +109,7 @@
&repmgr-cluster-cleanup;
+ &appendix-faq;
&appendix-signatures;
diff --git a/doc/version.sgml b/doc/version.sgml
index 061982a5..f26be77a 100644
--- a/doc/version.sgml
+++ b/doc/version.sgml
@@ -1 +1 @@
-
+