2

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!

  • I'm not sure I understand your problem. You have set a master/slave and want to run vacuum and analyze on slave? You don't need it a as vacuum and analyze action from the master are replicate to the slave... – Arkhena Aug 2 '17 at 10:33
  • I have a master and a read-only standby. I need to run vacuum/analyze on master. – vcarusi Aug 2 '17 at 10:36
  • Ok, so I'm sorry, I hadn't understand correctly... – Arkhena Aug 2 '17 at 12:00
  • It seems, this master behaves as a slave. I don't understand how it was possible. From aws, the hot_standby parameter can't be modified. I have an other db, master/slave, that have the following settings: _________________________master____slave<br/> hot_standby_______________off________on<br/> transaction_read_only_______off________on<br/> pg_is_in_recovery()_________false_______true<br/> here, it's possible to execute vacuum/analyze. also, autovacuum/autoanalyze processes run. – vcarusi Aug 2 '17 at 12:28
  • I don't know if the previous comment is clear hot_standby = off transaction_read_only = off pg_is_in_recovery()=false – vcarusi Aug 2 '17 at 12:35
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.