<br><br><div class="gmail_quote">On Wed, Nov 16, 2011 at 12:55 PM, Attila Megyeri <span dir="ltr"><<a href="mailto:amegyeri@minerva-soft.com">amegyeri@minerva-soft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Florian,<br>
<div class="im"><br>
-----Original Message-----<br>
From: Florian Haas [mailto:<a href="mailto:florian@hastexo.com">florian@hastexo.com</a>]<br>
Sent: 2011. november 16. 11:49<br>
To: The Pacemaker cluster resource manager<br>
Subject: Re: [Pacemaker] Postgresql streaming replication failover - RA needed<br>
<br>
Hi Attila,<br>
<br>
On 2011-11-16 10:27, Attila Megyeri wrote:<br>
> Hi All,<br>
><br>
><br>
><br>
> We have a two-node postgresql 9.1 system configured using streaming<br>
> replicaiton(active/active with a read-only slave).<br>
><br>
> We want to automate the failover process and I couldn't really find a<br>
> resource agent that could do the job.<br>
<br>
That is correct; the pgsql resource agent (unlike its mysql counterpart) does not support streaming replication. We've had a contributor submit a patch at one point, but it was somewhat ill-conceived and thus did not make it into the upstream repo. The relevant thread is here:<br>

<br>
<a href="http://lists.linux-ha.org/pipermail/linux-ha-dev/2011-February/018195.html" target="_blank">http://lists.linux-ha.org/pipermail/linux-ha-dev/2011-February/018195.html</a><br>
<br>
Would you feel comfortable modifying the pgsql resource agent to support replication? If so, we could revisit this issue and potentially add streaming replication support to pgsql.<br>
<br>
<br>
</div>Well I'm not sure I would be able to do that change. Failover is relatively easy to do but I really have no idea how to do the failback part.</blockquote><div><br></div><div>And that's exactly the reason why I haven't implemented it yet. With the current way how replication is done in PostgreSQL there is no easy way to switch between roles, or at least I don't know about a such way. Implementing just fail-over functionality by creating a trigger file on a slave server in the case of failure on master side doesn't create a full master-slave implementation in my opinion.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> I will definitively have to sort this out somehow, I am just unsure whether I will try to use the repmgr mentioned in the video, or pacemaker with some level of customization...<br>

<br>
Is the resource agent that you mentioned available somewhere?<br>
<br>
Thanks.<br>
<span class="HOEnZb"><font color="#888888">Attila<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Serge Dubrouski.<br>