<div class="gmail_quote">On Fri, Feb 18, 2011 at 11:41 AM, Dejan Muhamedagic <span dir="ltr"><<a href="mailto:dejanmm@fastmail.fm">dejanmm@fastmail.fm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
> I am attempting to write my own resource agent to support postgres WAL log<br>
> shipping.<br>
<br>
</div>Did you consider improving the existing resource agent? We do<br>
accept contributions. But we also dislike duplicating effort and<br>
resource agents functionality.<br></blockquote><div><br>I considered this, but unfortunately it would take a lot of effort. The existing "pgsql" resource agent is designed to start and stop postgres, whereas in this mode I want to switch an already running postgres into master mode. Even worse, once postgres is in master mode, there is no automated way to switch it back to standby mode (and writing one would require considerable effort.)<br>
<br>My plan is to start postgres on both servers using normal init scripts. If the primary server fails, pacemaker (on the secondary server) will STONITH the primary server, take over its IP, and switch postgres on that node to master mode. Failback would be done manually.<br>
<br>So I need a resource agent that acts as a dummy on the primary server (to keep pacemaker happy) but that switches postgres to master mode on the secondary server.<br><br>If this sounds like something others would be interested in I'd be happy to contribute it.<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Did you try "crm resource cleanup"?<br></blockquote><div><br>That's exactly what I needed. Sorry I couldn't find it in the docs.<br><br>Cheers,<br>Jody <br></div></div>