Fabio Takahashi
Fabio Takahashi

Reputation: 69

Postgres RDS pg_recvlogical replication role

Im trying to setup a streaming replication on a rds postgresql database using pg_recvlogical. When I send the command to start streaming

pg_recvlogical -d <database> -h <host> -p <port> --slot (slot_name) --start -f -

I receive the message:

"could not send replication command "Show data_directory_mode": ERROR: must be superuser or replication role to run this operation".

Im using the master user, which already has superuser role, and set rds.logical_replication to 1 on parameter group associated to the database. Anyone can help to undestand how can I resolve this issue?

Upvotes: 4

Views: 847

Answers (1)

karthikeayan
karthikeayan

Reputation: 5000

Logical replication with pg_recvlogical does currently not work correctly on RDS. The workaround is to use a 10.x pg_recvlogical client. Since the 'data_directory_mode' parameter was introduced with 11.x, a 10.x client will not send the command and hence work fine.

Source: https://forums.aws.amazon.com/thread.jspa?messageID=936554

Upvotes: 1

Related Questions