snippetsqlModerate
How to grant set the replication attribute on RDS PostgreSQL?
Viewed 0 times
postgresqlthegrantreplicationattributehowrdsset
Problem
On the AWS RDS documentation I see that
Grant and revoke the replication attribute onto all roles that are not
the rds_superuser role. For more information, see this section in the
PostgreSQL documentation.
source: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html
But, if I try, while logged in as my
I get an error stating that I cannot perform that action due to not being a superuser.
Do you guys know how to set the replication attribute to a user?
rds_superuser can:Grant and revoke the replication attribute onto all roles that are not
the rds_superuser role. For more information, see this section in the
PostgreSQL documentation.
source: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html
But, if I try, while logged in as my
rds_superuser:ALTER ROLE ROLENAME WITH REPLICATION;I get an error stating that I cannot perform that action due to not being a superuser.
Do you guys know how to set the replication attribute to a user?
Solution
We hit this head on too, and after much frustration discovered:
This seems to be working for logical replication.
UPDATE: Note that the user on the publisher needs to have SELECT access too!
CREATE ROLE some-user WITH LOGIN PASSWORD 'long-password';
grant rds_replication to user;
This seems to be working for logical replication.
UPDATE: Note that the user on the publisher needs to have SELECT access too!
Context
StackExchange Database Administrators Q#186013, answer score: 13
Revisions (0)
No revisions yet.