[英]postgres AWS RDS - failed to create replication users
I'm new to postgres.我是postgres的新手。 I created a postgres amazon RDS database.
我创建了一个 postgres amazon RDS 数据库。 after creation I connected to instance via the "postgres" login and the master password I supplied while creating the RDS.
创建后,我通过“postgres”登录名和创建 RDS 时提供的主密码连接到实例。
I'm trying to run this command我正在尝试运行此命令
CREATE ROLE ohdsi_admin
CREATEDB REPLICATION
VALID UNTIL 'infinity';
COMMENT ON ROLE ohdsi_admin
IS 'Administration group for OHDSI applications';
Getting this error: ERROR: must be superuser to create replication users SQL state: 42501收到此错误:错误:必须是超级用户才能创建复制用户 SQL state:42501
But to my understanding I'm super user now, with weak privilages (cause of RDS) How can I make the above command to work?但据我了解,我现在是超级用户,权限较弱(RDS 的原因)我怎样才能使上述命令起作用?
With AWS, you need to grant rds_replication
to the user instead.使用 AWS,您需要改为将
rds_replication
授予用户。
For example例如
CREATE ROLE ohdsi_admin;
GRANT rds_replication TO ohdsi_admin;
There is also information about this on the RDS documentation: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html RDS 文档中也有相关信息: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.ZFC35FDC70D22269D263EZCADA
If you encounter must be superuser to alter replication users
when using Aurora, then understand that SUPERUSER
and REPLICATION
attributes are not available to rds_superuser
, which is the group your master user belongs to.如果您在使用 Aurora 时遇到
must be superuser to alter replication users
,请了解SUPERUSER
和REPLICATION
属性对rds_superuser
不可用,这是您的主用户所属的组。
There is a separate role called rdsadmin
who has all the permissions but is not usable by RDS users.有一个名为
rdsadmin
的单独角色拥有所有权限,但 RDS 用户不能使用该角色。
Replication on Aurora Pgsql is only possible with the CREATE PUBLICATION
and CREATE SUBSCRIPTION
commands, available from Pgsql v10 (v10.6 in Aurora).只有使用 Pgsql v10(Aurora 中的 v10.6)提供的
CREATE PUBLICATION
和CREATE SUBSCRIPTION
命令才能在 Aurora Pgsql 上进行复制。 You cannot use the old way with ALTER USER some_user REPLICATION
.您不能将旧方式与
ALTER USER some_user REPLICATION
一起使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.