<div dir="ltr"><div>Hi, </div><div><br></div><div>I have issues with this config, for example when master is running corosync service use pg_ctl. But in the slave pg_ctl doesn&#39;t start and replication doesn&#39;t work. </div>
<div><br></div><div>This is my data:</div><div><br></div><div><br></div><div><div>Online: [ master slave ]</div><div>OFFLINE: [ ]</div><div><br></div><div>Full list of resources:</div><div><br></div><div>ClusterIP<span class="" style="white-space:pre">        </span>(ocf::heartbeat:IPaddr2):<span class="" style="white-space:pre">        </span>Started master</div>
<div>KAMAILIO        (lsb:kamailio): Started master</div><div> Master/Slave Set: msPostgresql [pgsql]</div><div>     Masters: [ master ]</div><div>     Stopped: [ pgsql:1 ]</div><div><br></div><div>Node Attributes:</div><div>
* Node master:</div><div>    + maintenance                       : off</div><div>    + master-pgsql                      : 1000</div><div>    + pgsql-data-status                 : LATEST</div><div>    + pgsql-master-baseline             : 0000000019000080</div>
<div>    + pgsql-status                      : PRI</div><div>* Node slave:</div><div>    + pgsql-data-status                 : DISCONNECT</div><div>    + pgsql-status                      : HS:sync</div></div><div><br></div>
<div><br></div><div>In my crm configure show is this:</div><div>node master \<br></div><div><div><span class="" style="white-space:pre">        </span>attributes maintenance=&quot;off&quot; pgsql-data-status=&quot;LATEST&quot;</div>
<div>node slave \<br></div><div><span class="" style="white-space:pre">        </span>attributes pgsql-data-status=&quot;DISCONNECT&quot;</div><div>primitive ClusterIP ocf:heartbeat:IPaddr2 \</div><div><span class="" style="white-space:pre">        </span>params ip=&quot;10.1.1.1&quot; cidr_netmask=&quot;24&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op monitor interval=&quot;15s&quot; \</div><div><span class="" style="white-space:pre">        </span>op start timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;stop&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op monitor timeout=&quot;60s&quot; interval=&quot;10s&quot; on-fail=&quot;restart&quot; \</div><div><span class="" style="white-space:pre">        </span>op stop timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;block&quot;</div>
<div>primitive KAMAILIO lsb:kamailio \</div><div><span class="" style="white-space:pre">        </span>op monitor interval=&quot;10s&quot; \</div><div><span class="" style="white-space:pre">        </span>op start interval=&quot;0&quot; timeout=&quot;120s&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op stop interval=&quot;0&quot; timeout=&quot;120s&quot; \</div><div><span class="" style="white-space:pre">        </span>meta target-role=&quot;Started&quot;</div><div>primitive pgsql ocf:heartbeat:pgsql \</div>
<div><span class="" style="white-space:pre">        </span>params pgctl=&quot;/usr/pgsql-9.2/bin/pg_ctl&quot; psql=&quot;/usr/pgsql-9.2/bin/psql&quot; pgdata=&quot;/var/lib/pgsql/9.2/data/&quot; rep_mode=&quot;sync&quot; node_list=&quot;master slave&quot; restore_command=&quot;cp /var/lib/pgsql/9.2/pg_archive/%f %p&quot; primary_conninfo_opt=&quot;keepalives_idle=60 keepalives_interval=5 keepalives_count=5&quot; master_ip=&quot;10.1.1.1&quot; restart_on_promote=&quot;true&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op start timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;restart&quot; \</div><div><span class="" style="white-space:pre">        </span>op monitor timeout=&quot;60s&quot; interval=&quot;4s&quot; on-fail=&quot;restart&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op monitor timeout=&quot;60s&quot; interval=&quot;3s&quot; on-fail=&quot;restart&quot; role=&quot;Master&quot; \</div><div><span class="" style="white-space:pre">        </span>op promote timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;restart&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op demote timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;stop&quot; \</div><div><span class="" style="white-space:pre">        </span>op stop timeout=&quot;60s&quot; interval=&quot;0s&quot; on-fail=&quot;block&quot; \</div>
<div><span class="" style="white-space:pre">        </span>op notify timeout=&quot;60s&quot; interval=&quot;0s&quot;</div><div>ms msPostgresql pgsql \</div><div><span class="" style="white-space:pre">        </span>meta master-max=&quot;1&quot; master-node-max=&quot;1&quot; clone-max=&quot;2&quot; clone-node-max=&quot;1&quot; notify=&quot;true&quot; target-role=&quot;Started&quot;</div>
<div>location cli-prefer-KAMAILIO KAMAILIO \</div><div><span class="" style="white-space:pre">        </span>rule $id=&quot;cli-prefer-rule-KAMAILIO&quot; inf: #uname eq master</div><div>location cli-prefer-pgsql msPostgresql \</div>
<div><span class="" style="white-space:pre">        </span>rule $id=&quot;cli-prefer-rule-pgsql&quot; inf: #uname eq master</div><div>location cli-standby-ClusterIP ClusterIP \</div><div><span class="" style="white-space:pre">        </span>rule $id=&quot;cli-standby-rule-ClusterIP&quot; -inf: #uname eq slave</div>
<div>colocation colocation-1 inf: ClusterIP msPostgresql KAMAILIO</div><div>order order-1 inf: ClusterIP msPostgresql KAMAILIO</div><div>property $id=&quot;cib-bootstrap-options&quot; \</div><div><span class="" style="white-space:pre">        </span>dc-version=&quot;1.1.8-7.el6-394e906&quot; \</div>
<div><span class="" style="white-space:pre">        </span>cluster-infrastructure=&quot;classic openais (with plugin)&quot; \</div><div><span class="" style="white-space:pre">        </span>expected-quorum-votes=&quot;2&quot; \</div><div>
<span class="" style="white-space:pre">        </span>stonith-enabled=&quot;false&quot;</div></div><div><br></div><div>Any idea why doesn&#39;t start on the second slave?</div><div><br></div><div>More info:</div><div><br></div><div>
Master:</div><div><br></div><div><div>root@master ~]# netstat -putan | grep 5432 | grep LISTEN</div><div>tcp        0      0 <a href="http://0.0.0.0:5432">0.0.0.0:5432</a>                0.0.0.0:*                   LISTEN      3241/postgres</div>
<div>tcp        0      0 :::5432                     :::*                        LISTEN      3241/postgres</div><div>[root@master ~]# ps axu | grep postgres</div><div>postgres  3241  0.0  0.0  97072  7692 ?        S    11:41   0:00 /usr/pgsql-9.2/bin/postgres -D /var/lib/pgsql/9.2/data -c config_file=/var/lib/pgsql/9.2/data//postgresql.conf</div>
<div>postgres  3293  0.0  0.0  97072  1556 ?        Ss   11:41   0:00 postgres: checkpointer process</div><div>postgres  3294  0.0  0.0  97072  1600 ?        Ss   11:41   0:00 postgres: writer process</div><div>postgres  3295  0.0  0.0  97072  1516 ?        Ss   11:41   0:00 postgres: wal writer process</div>
<div>postgres  3296  0.0  0.0  97920  2760 ?        Ss   11:41   0:00 postgres: autovacuum launcher process</div><div>postgres  3297  0.0  0.0  82712  1500 ?        Ss   11:41   0:00 postgres: archiver process   failed on 000000010000000000000001</div>
<div>postgres  3298  0.0  0.0  82872  1568 ?        Ss   11:41   0:00 postgres: stats collector process</div><div>root     10901  0.0  0.0 103232   852 pts/0    S+   11:44   0:00 grep postgres</div></div><div><br></div><div>
<br></div><div>On slave:</div><div><br></div><div><div>[root@slave ~]# ps axu | grep postgre</div><div>root      3332  0.0  0.0 103232   856 pts/0    S+   11:45   0:00 grep postgre</div><div>[root@slave ~]# netstat -putan | grep 5432</div>
<div>[root@slave ~]#</div></div><div><br></div><div><br></div><div>If I make pg_ctl /var/lib/pgsql/9.2/data/ start work ok </div><div><br></div><div>Any idea?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/9/11 Takatoshi MATSUO <span dir="ltr">&lt;<a href="mailto:matsuo.tak@gmail.com" target="_blank">matsuo.tak@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Eloy<br>
<br>
Please see <a href="http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster" target="_blank">http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster</a> .<br>
In the document, it uses virtual IP to receive connection,<br>
so it doesn&#39;t need to change recovery.conf.<br>
<br>
Thanks,<br>
Takatoshi MATSUO<br>
<br>
<br>
2013/9/11 Eloy Coto Pereiro &lt;<a href="mailto:eloy.coto@gmail.com">eloy.coto@gmail.com</a>&gt;:<br>
<div><div class="h5">&gt; Hi,<br>
&gt;<br>
&gt; In Postgresql if you use wal replication<br>
&gt; &lt;<a href="http://wiki.postgresql.org/wiki/Streaming_Replication" target="_blank">http://wiki.postgresql.org/wiki/Streaming_Replication</a>&gt; when the master<br>
&gt; servers fails need to change the recovery.conf on the slave server.<br>
&gt;<br>
&gt; In this case any tool, when the master is down, execute a command and get<br>
&gt; this info?<br>
&gt; Is this the right tool for postgresql&#39;s replication?<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; 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>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt;<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://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div><br></div>