13.2. repmgrd daemon

If installed from a package, the repmgrd can be started via the operating system's service command, e.g. in systemd using systemctl.

See appendix Package details for details of service commands for different distributions.

repmgrd can be started manually like this:

        repmgrd -f /etc/repmgr.conf --pid-file /tmp/repmgrd.pid --daemonize

and stopped with kill `cat /tmp/repmgrd.pid`. Adjust paths as appropriate.

13.2.1. repmgrd daemon configuration on Debian/Ubuntu

If repmgr was installed from Debian/Ubuntu packages, additional configuration is required before repmgrd is started as a daemon.

This is done via the file /etc/default/repmgrd, which by default looks like this:

# default settings for repmgrd. This file is source by /bin/sh from
# /etc/init.d/repmgrd

# disable repmgrd by default so it won't get started upon installation
# valid values: yes/no

# configuration file (required)

# additional options

# user to run repmgrd as

# repmgrd binary

# pid file

Set REPMGRD_ENABLED to yes, and REPMGRD_CONF to the repmgr.conf file you are using.

If using systemd, you may need to execute systemctl daemon-reload. Also, if you attempted to start repmgrd using systemctl start repmgrd, you'll need to execute systemctl stop repmgrd. Because that's how systemd rolls.