0

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?

2
  • 1
    hot_standby is not a value for wal_level it's a separate property (which needs to go on a line of its own)
    – user1822
    Commented Sep 22, 2020 at 7:02
  • @a_horse_with_no_name Would you like to write it as an answer?
    – rawmain
    Commented Sep 23, 2020 at 0:29

1 Answer 1

1

The repmgr doc you linked to says to use wal_level = 'hot_standby' with PG versions 9.5 or older, and wal_level = 'replica' for PG versions 9.6 or newer.

# Ensure WAL files contain enough information to enable read-only queries
# on the standby.
#
#  PostgreSQL 9.5 and earlier: one of 'hot_standby' or 'logical'
#  PostgreSQL 9.6 and later: one of 'replica' or 'logical'
#    ('hot_standby' will still be accepted as an alias for 'replica')
#
# See: https://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-WAL-LEVEL

You're using PostgreSQL 10, so replica or logical should be used for this option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.