[Pacemaker] Postgresql streaming replication failover - RA needed

Takatoshi MATSUO matsuo.tak at gmail.com
Fri Nov 25 02:55:48 EST 2011

Hi Attila

2011/11/24 Attila Megyeri <amegyeri at minerva-soft.com>:
> Hi Takatoshi, All,
> Thanks for your reply.
> I see that you have invested significant effort in the development of the RA. I spent the last day trying to set up the RA, but without much success.
> My infrastructure is very similar to yours, except for the fact that currently I am testing with a single network adapter.
> Replication works nicely when I start the databases manually, not using corosync.
> When I try to start using corosync,I see that the ping resources start normally, but the msPostgresql starts on both nodes in slave mode, and I see "HS:alone"

To see "HS:alone" is normal.
And RA compares xlog locations and promote the postgresql having new data.

> In the Wiki you state, the if I start on a signle node only, PSQL should start in Master mode (PRI), but this is not the case.

If the data is old, the node can't be master.
To be master needs pgsql-data-status="LATEST" or "STREAMING|SYNC".
Plese check it using "crm_mon -A".

And to become a master from stopped takes a few minutes because the RA
compares xlog location on monitor.

> The recovery.conf file is created immediately, and from the logs I see no attempt at all to promote the node.
> In the postgres logs I see that node1, which is supposed to be a master, tries to connect to the vip-rep IP address, which is NOT brought up, because it depends on the Master role...
> Do you have any idea?

Please check HA log.
My RA outputs "My data is out-of-date. status=********" to log if the
data is old.

Takatoshi MATSUO

More information about the Pacemaker mailing list