|
|
|
|
Index: dbutils.c
|
|
|
|
|
--- dbutils.c.orig 2019-06-26 08:57:17.000000000 +0200
|
|
|
|
|
+++ dbutils.c 2019-06-28 08:37:24.158777000 +0200
|
|
|
|
|
@@ -24,6 +24,7 @@
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#include <dirent.h>
|
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
+#include <netinet/in.h>
|
|
|
|
|
|
|
|
|
|
#include "repmgr.h"
|
|
|
|
|
#include "dbutils.h"
|
|
|
|
|
Index: repmgr.conf.sample
|
|
|
|
|
--- repmgr.conf.sample.orig 2019-06-26 08:57:17.000000000 +0200
|
|
|
|
|
+++ repmgr.conf.sample 2019-06-28 08:38:31.537396000 +0200
|
|
|
|
|
@@ -20,35 +20,10 @@
|
|
|
|
|
# repmgr and repmgrd require the following items to be explicitly configured.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-#node_id= # A unique integer greater than zero
|
|
|
|
|
-#node_name='' # An arbitrary (but unique) string; we recommend
|
|
|
|
|
- # using the server's hostname or another identifier
|
|
|
|
|
- # unambiguously associated with the server to avoid
|
|
|
|
|
- # confusion. Avoid choosing names which reflect the
|
|
|
|
|
- # node's current role, e.g. 'primary' or 'standby1',
|
|
|
|
|
- # as roles can change and it will be confusing if
|
|
|
|
|
- # the current primary is called 'standby1'.
|
|
|
|
|
- # The string's maximum length is 63 characters and it should
|
|
|
|
|
- # contain only printable ASCII characters.
|
|
|
|
|
-
|
|
|
|
|
-#conninfo='' # Database connection information as a conninfo string.
|
|
|
|
|
- # All servers in the cluster must be able to connect to
|
|
|
|
|
- # the local node using this string.
|
|
|
|
|
- #
|
|
|
|
|
- # For details on conninfo strings, see:
|
|
|
|
|
- # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
|
|
|
|
- #
|
|
|
|
|
- # If repmgrd is in use, consider explicitly setting
|
|
|
|
|
- # "connect_timeout" in the conninfo string to determine
|
|
|
|
|
- # the length of time which elapses before a network
|
|
|
|
|
- # connection attempt is abandoned; for details see:
|
|
|
|
|
- # https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-CONNECT-TIMEOUT
|
|
|
|
|
-
|
|
|
|
|
-#data_directory='' # The node's data directory. This is needed by repmgr
|
|
|
|
|
- # when performing operations when the PostgreSQL instance
|
|
|
|
|
- # is not running and there's no other way of determining
|
|
|
|
|
- # the data directory.
|
|
|
|
|
-
|
|
|
|
|
+node_id=1
|
|
|
|
|
+node_name='node1'
|
|
|
|
|
+conninfo='host=node1 user=repmgr dbname=repmgr connect_timeout=2'
|
|
|
|
|
+data_directory='@l_prefix@/var/postgresql/db'
|
|
|
|
|
|
|
|
|
|
# =============================================================================
|
|
|
|
|
# Optional configuration items
|
|
|
|
|
@@ -145,21 +120,8 @@
|
|
|
|
|
# Environment/command settings
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
-#pg_bindir='' # Path to PostgreSQL binary directory (location
|
|
|
|
|
- # of pg_ctl, pg_basebackup etc.). Only needed
|
|
|
|
|
- # if these files are not in the system $PATH.
|
|
|
|
|
- #
|
|
|
|
|
- # Debian/Ubuntu users: you will probably need to
|
|
|
|
|
- # set this to the directory where `pg_ctl` is located,
|
|
|
|
|
- # e.g. /usr/lib/postgresql/9.6/bin/
|
|
|
|
|
- #
|
|
|
|
|
- # *NOTE* "pg_bindir" is only used when repmgr directly
|
|
|
|
|
- # executes PostgreSQL binaries; any user-defined scripts
|
|
|
|
|
- # *must* be specified with the full path
|
|
|
|
|
-
|
|
|
|
|
-#repmgr_bindir='' # Path to repmgr binary directory (location of the repmgr
|
|
|
|
|
- # binary. Only needed if the repmgr executable is not in
|
|
|
|
|
- # the system $PATH or the path defined in "pg_bindir".
|
|
|
|
|
+pg_bindir='@l_prefix@/bin'
|
|
|
|
|
+repmgr_bindir='@l_prefix@/bin'
|
|
|
|
|
|
|
|
|
|
#use_primary_conninfo_password=false # explicitly set "password" in recovery.conf's
|
|
|
|
|
# "primary_conninfo" parameter using the value contained
|