Re: 9.2.3 crashes during archive recovery - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: 9.2.3 crashes during archive recovery
Date
Msg-id 51273D0F.1070703@vmware.com
Whole thread Raw
In response to Re: 9.2.3 crashes during archive recovery  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Review : Add hooks for pre- and post-processor executables for COPY and \copy
Next
From: Heikki Linnakangas
Date:
Subject: Re: 9.2.3 crashes during archive recovery