Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

postgres AWS RDS - failed to create replication users

I'm new to postgres. I created a postgres amazon RDS database. after creation I connected to instance via the "postgres" login and the master password I supplied while creating the 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

But to my understanding I'm super user now, with weak privilages (cause of RDS) How can I make the above command to work ?

like image 602
Liav Avatar asked Jul 22 '26 09:07

Liav


1 Answers

With AWS, you need to grant rds_replication to the user instead.

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

like image 74
Thom Brown Avatar answered Jul 25 '26 02:07

Thom Brown



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!