撰写 - 如何创建具有超级用户或复制角色的 PostgreSQL 用户?
compose - how to create a PostgreSQL user with superuser or replication roles?
我正在尝试使用 compose transporter 将更改从 postgres 复制到 rabbitmq:
var source = postgres({
"uri": "postgres://admin:****@****.dblayer.com:17596/compose"
"debug": true,
"tail": true,
"replication_slot": "slot"
})
var sink = rmq = rabbitmq({
"uri": "amqps://transporter:****@****.composedb.com:17597/****",
"routing_key": "test",
"key_in_field": false
// "delivery_mode": 1, // non-persistent (1) or persistent (2)
// "api_port": 15672,
// "ssl": false,
// "cacerts": ["/path/to/cert.pem"]
})
t.Source(source).Save(sink)
错误:
INFO[0001] Listening for changes... db=compose logical_decoding_slot=slot
ERRO[0002] error plucking from logical decoding pq: must be superuser or replication role to use replication slots db=compose
如何设置具有超级用户或复制角色的 Postgres 用户?撰写时似乎不允许这样做?
ALTER USER admin WITH REPLICATION;
结果:
ERROR: must be superuser to alter replication users
另请注意:
Can I create a 'superuser'?
PostgreSQL allows the creation of a superuser. Being a superuser implies the ability to bypass all access
permission checks within the database, so superuserdom should not be
granted lightly. For security purposes, we do not allow the creation
of superusers.
我从 Compose 支持部门收到的回复是 Compose PostgreSQL 不支持超级用户帐户。
我正在尝试使用 compose transporter 将更改从 postgres 复制到 rabbitmq:
var source = postgres({
"uri": "postgres://admin:****@****.dblayer.com:17596/compose"
"debug": true,
"tail": true,
"replication_slot": "slot"
})
var sink = rmq = rabbitmq({
"uri": "amqps://transporter:****@****.composedb.com:17597/****",
"routing_key": "test",
"key_in_field": false
// "delivery_mode": 1, // non-persistent (1) or persistent (2)
// "api_port": 15672,
// "ssl": false,
// "cacerts": ["/path/to/cert.pem"]
})
t.Source(source).Save(sink)
错误:
INFO[0001] Listening for changes... db=compose logical_decoding_slot=slot
ERRO[0002] error plucking from logical decoding pq: must be superuser or replication role to use replication slots db=compose
如何设置具有超级用户或复制角色的 Postgres 用户?撰写时似乎不允许这样做?
ALTER USER admin WITH REPLICATION;
结果:
ERROR: must be superuser to alter replication users
另请注意:
Can I create a 'superuser'?
PostgreSQL allows the creation of a superuser. Being a superuser implies the ability to bypass all access permission checks within the database, so superuserdom should not be granted lightly. For security purposes, we do not allow the creation of superusers.
我从 Compose 支持部门收到的回复是 Compose PostgreSQL 不支持超级用户帐户。