Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I test the new feature about "replication features" of PostgreSQL9.1, First I have installed the Hot-standby of PostgreSQL9.1 successfully. It is not a problem。 What I want to test is that I want to use command "pg_ctl start promote " to active standby node instead of creating a trigger file 。 Yes, after I execute the command, the standby node then becomes primary and allow write/read operations。 But the initial primary node can not switchover to the standby role automatically. I am not sure If PostgreSQL9.1 is able to use "pg_ctl promote" do switchover between primary and standby node 。Can any body explain this ?

share|improve this question
up vote 2 down vote accepted

There is no 'demote' option for pg_ctl - if the primary was cold when the standby was promoted perhaps it could be converted to a standby manually, but otherwise it will need a new base backup from the new primary.

The normal reason for switchover would be if the primary has failed so this would not be necessary.

share|improve this answer
Thanks for your replay, not the 'demote' , I mean "pg_ctl promote", the url is the detail, – francs Sep 21 '11 at 1:07
I understand, but aren't you asking if there is a corresponding demote for the primary? AFAIK there is no automatic way of doing what you want. – Jack Douglas Sep 21 '11 at 6:49
thanks,anyway we can see that PostgreSQL9.1 is trying to make progress about Hot-Standby Hope PostgreSQL 9.2 can switch over automatlly ,may be just by a single commond. – francs Sep 21 '11 at 7:39
I can't find it on the todo list - you could try asking on the mailing lists and suggesting the feature – Jack Douglas Sep 21 '11 at 18:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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