Followed the official repmgr document, I set these items to the configuration file:
shared_preload_libraries = 'repmgr'
max_wal_senders = 10
max_replication_slots = 10
wal_level = 'hot_standby'
hot_standby = on
archive_mode = on
However, in the /var/lib/pgsql/10/data/postgresql.conf
file, something default as
#wal_level = replica # minimal, replica, or logical
# (change requires restart)
Doesn't have hot_standby
option.
If I use the config as repmgr document, when I want to create a database or user, alwasy hanging.
createuser -s myuser
createdb -E UNICODE -l en_US.UTF-8 -T template0 mydb -O myuser
But use the default postgresql configuration will work well.
So how to use repmgr
with PostgreSQL 10 correctly?
Best Answer
The repmgr doc you linked to says to use
wal_level = 'hot_standby'
with PG versions 9.5 or older, andwal_level = 'replica'
for PG versions 9.6 or newer.You're using PostgreSQL 10, so
replica
orlogical
should be used for this option.