On Mon, Feb 14, 2011 at 1:28 AM, Takatoshi MATSUO <matsuo....@gmail.com> wrote: >>> Ideally demote operation should stop a master node and then restart it >>> in hot-standby mode. It's up to administrator to make sure that no >>> node with outdated data gets promoted to the master role. One should >>> follow standard procedures: cluster software shouldn't be configured >>> for autostart at the boot time, administrator has to make sure that >>> data was refreshed if the node was down for some prolonged time. > >> Hmm.. >> Do you mean that RA puts recovery.conf automatically at demote op to >> start hot standby? >> Please give me some time to think it over. > > > Sorry, I got the wrong idea about restoring data. > To start as hot-standby needs restoring anytime, > because Time-line ID of PostgreSQL is incremented. > In addition, shutting down the PostgreSQL with "immediate" option causes > inconsistent WAL between primary and hot-standby. > > So I think it's difficult to start slave automatically at demote. > Still, do you think it's better to implement restoring ?
I'm afraid it's not just better, but it's a must. We have to play by Pacemaker's rules and that means that we have to properly implement "demote" operation and that's switching from Master to Slave, not just stopping Master. I do appreciate your efforts, but implementation has to conform to Pacemaker standards, i.e. Master has to start where it's configured in Pacemaker, not just where recovery.conf file exists. Administrator has to be able to easily switch between node roles and so on. I still need some more time to learn PostgreSQL data replication and do some tests. Let's think if that's possible to implement real Master/Slave in Pacemaker sense of things. > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > -- Serge Dubrouski. _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/