Postgresql – how can be changed hot_standby parameter on postgres 9.6 aws/rds

amazon-rdsawsmaster-slave-replicationpostgresql

I have a postgres solution on aws/rds with a master and a read replica.

                         master    slave
hot_standby               on        on
transaction_read_only     on        on
pg_is_in_recovery()       true      true

Having the master set in this way the vacuum and analyze process don't work.
Any idea how to change this setting?
thank you!

Best Answer

Ideally the parameter hot_standby should be on only for slave server and pg_is_in_recovery() should be false for master server.

You can follow below steps to make these changes:

  1. Check postgresql.conf file on master server and if the parameter hot_standby is set to on you can change it to off and then restart the server.
  2. On the master server in the data file location, if there is a file called recovery.conf then just delete that file and restart the server.

Hope this will help.