Question

I need to change the password on my slave posgresql server, because the person who set it up left the password the same as the password for the super user account on our other server.

When I run psql as the super user on the slave server, and then attempt to execute the command

ALTER USER username PASSWORD 'newPassword';

I get the error:

ERROR: cannot execute ALTER ROLE in a read-only transaction

When I attempt to change the transaction with:

SET TRANSACTION READ WRITE;

I get the error:

ERROR: cannot set transaction read-write mode during recovery

I understand that the slave server can only do reads, though how do I bypass this to change the roles password, or pull the slave temporarily out of the recover mode?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top