Take the 2-minute tour ×
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. It's 100% free, no registration required.

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 commond "pg_ctl start promote " to active standby node instead of creating a trigger file 。 Yes, after I excute the commond, the standby node then becomes primary and allow write/read operations。 But the inital primary node can not switchover to the stnadby role automately. I am not usre If PostgreSQL9.1 is able to use "pg_ctl promote" do switchover between primary and standby node 。 Any body will explain this , thanks.

share|improve this question
add comment

1 Answer 1

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, postgresql.org/docs/9.1/static/app-pg-ctl.html –  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
add comment

Your Answer

 
discard

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.