Though this recipe focuses on a single PostgreSQL node to initialize the cluster, only the first step must be performed on our initial primary node. For setting up subsequent replica nodes, we only need to begin with the configuration file.
This first step is to provide a location where repmgr can maintain its metadata regarding the cluster status and configuration. To do this, we create a repmgr user and a repmgr database to make the association obvious. As repmgr itself is a PostgreSQL extension, we must also modify postgresql.conf to include repmgr in the shared_preload_libraries parameter.
Without this step, the repmgr command-line tool and daemon will be unable to initialize or operate. We also enable wal_log_hints as ...