我正在尝试使用 pushdelta 在主从设置中设置 bucardo,但是在尝试创建同步时我一直遇到以下错误。
bash-4.1$ bucardo_ctl add sync dns source=dns_tables type=pushdelta targetgroup=dns_slaves
WARNING: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=dns;port=5432 at line 191.
CONTEXT: PL/Perl function "validate_sync"
SQL statement "SELECT validate_sync('dns')"
PL/Perl function "validate_sync"
Failed to add sync: DBD::Pg::st execute failed: ERROR: DBD::Pg::st execute failed: ERROR: permission denied for schema bucardo
LINE 1: SELECT 1 FROM bucardo.bucardo_delta_targets WHERE tablename=...
^ at line 191. at line 30.
CONTEXT: PL/Perl function "validate_sync" at /usr/sbin/bucardo_ctl line 3362.
这是因为我没有正确设置远程部分吗?主服务器的 hba/ident 如下:
掌握
配置文件
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
#local all postgres trust
host all postgres 127.0.0.1/32 ident
local all postgres ident
local all bucardo ident map=bucardo
local dns dns md5
host all all 127.0.0.1/32 md5
配置文件
# MAPNAME SYSTEM-USERNAME PG-USERNAME
bucardo postgres bucardo
bucardo bucardo bucardo
奴隶
配置文件
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all ident
host all all 127.0.0.1/32 ident
# 10.0.1.2 is the master
host bucardo bucardo 10.0.1.2/32 ident
我真的不知道我做错了什么,但这可能与远程端设置不正确有关,但我还没有找到太多相关信息。
答案1
出于某种原因,我完全忽略了您必须在添加同步后为 bucardo 本身在从属服务器上创建一个超级用户。