【问题标题】:compose - how to create a PostgreSQL user with superuser or replication roles?compose - 如何创建具有超级用户或复制角色的 PostgreSQL 用户?
【发布时间】:2017-12-01 14:51:19
【问题描述】:

我正在尝试使用 compose 传输器将更改从 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 用户设置超级用户或复制角色?这似乎在 compose 上是不允许的?

ALTER USER admin WITH REPLICATION;

结果:

ERROR: must be superuser to alter replication users

另请注意:

我可以创建一个“超级用户”吗?

PostgreSQL 允许创建超级用户。成为超级用户意味着能够绕过所有访问 数据库内的权限检查,所以不应该是超级用户 轻而易举地授予。出于安全考虑,我们不允许创建 超级用户。

来源:https://help.compose.com/v2.0/docs/postgresql-faq

【问题讨论】:

    标签: postgresql compose-db


    【解决方案1】:

    我从 Compose Support 收到的回复是 Compose PostgreSQL 不支持超级用户帐户。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-07
      • 2015-11-05
      • 1970-01-01
      • 1970-01-01
      • 2021-05-15
      • 1970-01-01
      • 1970-01-01
      • 2019-09-13
      相关资源
      最近更新 更多