On 14.02.2013 19:18, Fujii Masao wrote:
> Yes. And the resource agent for streaming replication in Pacemaker (it's the
> OSS clusterware) is the user of that archive recovery scenario, too. When it
> starts up the server, it always creates the recovery.conf and starts the server
> as the standby. It cannot start the master directly, IOW the server is always
> promoted to the master from the standby. So when it starts up the server
> after the server crashes, obviously it executes the same recovery scenario
> (i.e., force archive recovery instead of crash one) as Kyotaro described.
>
> The reason why that resource agent cannot start up the master directly is
> that it manages three server states, called Master, Slave and Down. It can
> move the server state from Down to Slave, and the reverse direction.
> Also it can move the state from Slave to Master, and the reverse direction.
> But there is no way to move the state between Down and Master directly.
> This kind of the state transition model is isolated case in
> clusterware, I think.
I don't have much sympathy for that to be honest. Seems like something
that should be fixed in Pacemaker or the scripts used to glue it with
PostgreSQL. However, this patch should make that work, so I guess
everyone is happy.
- Heikki