2.3.编辑配置文件并启用 BDR

编辑这两个节点(实例) postgresql.conf 配置文件:

    shared_preload_libraries = 'bdr'
    wal_level = 'logical'
    track_commit_timestamp = on
    max_connections = 100
    max_wal_senders = 10
    max_replication_slots = 10
    # Make sure there are enough background worker slots for BDR to run
    max_worker_processes = 10

    # These aren't required, but are useful for diagnosing problems
    #log_error_verbosity = verbose
    #log_min_messages = debug1
    #log_line_prefix = 'd=%d p=%p a=%a%q '

    # Useful options for playing with conflicts
    #bdr.default_apply_delay=2000   # milliseconds
    #bdr.log_conflicts_to_table=on

在pg_hba.conf 文件中编辑或者取消这两个节点复制时的认证:

    local   replication   postgres                  trust
    host    replication   postgres     127.0.0.1/32 trust
    host    replication   postgres     ::1/128      trust

results matching ""

    No results matching ""