简体   繁体   English

AWS RDS 跨区域只读副本是否也复制用户和角色?

[英]Do AWS RDS cross-region read replicas also replicate users and roles?

I have a Postgres DB set up on AWS in region X and a read replica of that DB in region Y.我在区域 X 的 AWS 上设置了一个 Postgres 数据库,并在区域 Y 中设置了该数据库的只读副本。

I'm about to perform 2 action in my source DB in region X:我即将在 X 区的源数据库中执行 2 个操作:

  1. Change the password of one of the users (ALTER USER my_user WITH PASSWORD 'password').更改其中一位用户的密码(ALTER USER my_user WITH PASSWORD 'password')。
  2. Revoke a role from one of the users (REVOKE my_role FROM my_user).撤销其中一位用户的角色(REVOKE my_role FROM my_user)。

Will that change also replicate to the replica in region Y?该更改是否也会复制到区域 Y 中的副本?

I couldn't really understand whether the replication only replicates data (table contents) or also user / role definitions.我真的不明白复制是只复制数据(表内容)还是用户/角色定义。

Thanks!谢谢! :) :)

Will that change also replicate to the replica in region Y?该更改是否也会复制到区域 Y 中的副本?

Yes, Amazon RDS read replicas are meant to be a full clone of the primary database for various reasons such as implementing failure recovery .是的,出于各种原因(例如实施故障恢复),Amazon RDS 只读副本旨在成为主数据库的完整克隆。

Read replicas may need to be promoted to a stand-alone writeable DB instance in the case of the primary DB failing & this requires an exact copy.在主数据库失败的情况下,可能需要将只读副本提升为独立的可写数据库实例,这需要一个精确的副本。

Each PostgreSQL database contains a pg_catalog schema (in addition to public & user-created schemas) which contains the system tables and all the built-in data types, functions, and operators.每个 PostgreSQL 数据库都包含一个pg_catalog模式(除了公共和用户创建的模式),其中包含系统表和所有内置数据类型、函数和运算符。 This includes the pg_authid system catalog (table) which contains all the roles & 'users' ('users' since they are ultimately a role with login access).这包括pg_authid系统目录(表),其中包含所有角色和“用户”(“用户”,因为它们最终是具有登录访问权限的角色)。

Since Amazon RDS replicates all databases in the source DB instance (and thus schemas), any user or role changes to the source DB instance will be replicated on all read replicas .由于Amazon RDS 会复制源数据库实例中的所有数据库(以及架构),因此对源数据库实例的任何用户或角色更改都将复制到所有只读副本上

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM