简体   繁体   English

postgres AWS RDS - 无法创建复制用户

[英]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 ,请了解SUPERUSERREPLICATION属性对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 PUBLICATIONCREATE 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.

相关问题 AWS RDS Postgres 复制到 GCP 云 SQL - AWS RDS Postgres replication to GCP cloud SQL AWS postgres RDS 读取复制如何处理架构切换? - How does AWS postgres RDS read replication handle schema switching? 在另一个AWS账户中创建RDS / Postgres副本吗? - Create an RDS/Postgres Replica in another AWS account? “创建或替换触发器”在 AWS RDS/Postgres 上不可用 - "create or replace trigger" not available on AWS RDS/Postgres 是否创建AWS Postgres RDS模式的一致视图? - Create a consistent view of an AWS Postgres RDS schema? 在AWS-RDS中创建Postgres事件触发器 - Create Postgres Event Trigger in AWS-RDS AWS RDS Postgres:更改 rds.logical_replication = 1 后 WAL_LEVEL 未设置为“逻辑” - AWS RDS Postgres: WAL_LEVEL not set to 'logical' after changing rds.logical_replication = 1 如何在本地 postgres 中为 AWS RDS postgres 中的主数据库设置复制实例? - how to setup replication instance in on premises postgres for master database in AWS RDS postgres? Cloud SQL 来自 AWS RDS Postgres 的 Postgres 外部复制 - 源表示实例的问题 - Cloud SQL Postgres external replication from AWS RDS Postgres - problem with source representation instance 连接到Postgres AWS RDS实例 - “证书验证失败” - Connecting to Postgres AWS RDS Instance - “certificate verify failed”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM