<div dir="ltr">Hi!<div>thanks for help .. anyway - my slave node is still async, event the select you mentioned shows async .. at least i found out, that if i set rep_mode to &quot;async&quot;, the slave node gets promoted when master fails ... </div>
<div>so right now it is working, but i would like still know how to make streaming replication synchronous .. i did everything as in mentioned wiki page, but it is still async</div><div>any idea?</div><div>Thanks</div><div>
Tomas</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014/1/14 東一彦 <span dir="ltr">&lt;<a href="mailto:higashi.kazuhiko@lab.ntt.co.jp" target="_blank">higashi.kazuhiko@lab.ntt.co.jp</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<div class="im"><br>
<br>
&gt; but after some tests something went wrong and i don&#39;t know what and why and how to get it back working ... now when i start crm, master is PRI, but slave gets into HS:ASYNC state .. and when master fails, and slave gets into HS:alone state<br>
</div>
It is PostgreSQL to select the node whether &quot;sync&quot; or &quot;async&quot;.<br>
pgsql RA displays a result of the following SQL.<br>
<br>
  select application_name,upper(state),<u></u>upper(sync_state) from pg_stat_replication;<br>
<br>
So, at first, please watch PostgreSQL&#39;s log.<br>
<br>
<br>
<br>
Possibly the data may become inconsistent.<br>
You can resolve the inconsistency in the following operation.<br>
<br>
 <a href="http://clusterlabs.org/wiki/PgSQL_Replicated_Cluster#after_fail-over" target="_blank">http://clusterlabs.org/wiki/<u></u>PgSQL_Replicated_Cluster#<u></u>after_fail-over</a><br>
<br>
<br>
Regards,<br>
Kazuhiko HIGASHI<div><div class="h5"><br>
<br>
(2014/01/10 17:48), Tomáš Vajrauch wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi,<br>
<br>
i am trying to run postgresql cluster with streaming replication using pgsql RA and pacemaker ..<br>
i succeded once, master was as PRI, slave HS:sync, failover worked as it should (slave become master) ..<br>
but after some tests something went wrong and i don&#39;t know what and why and how to get it back working ... now when i start crm, master is PRI, but slave gets into HS:ASYNC state .. and when master fails, and slave gets into HS:alone state<br>

<br>
can somebody please give me hint what should i do or what should i look for?<br>
<br>
Thanks a lot for any help<br>
Tomas<br>
<br>
my configuration:<br>
<br>
node jboss-test \<br>
         attributes pgsql-data-status=&quot;LATEST&quot;<br>
node jboss-test2 \<br>
         attributes pgsql-data-status=&quot;STREAMING|<u></u>ASYNC&quot;<br>
primitive pgsql ocf:heartbeat:pgsql \<br>
         params pgctl=&quot;/opt/postgres/9.3/bin/<u></u>pg_ctl&quot; psql=&quot;/opt/postgres/9.3/bin/<u></u>psql&quot; pgdata=&quot;/opt/postgres/9.3/<u></u>data/&quot; rep_mode=&quot;sync&quot; node_list=&quot;jboss-test jboss-test2&quot; restore_command=&quot;cp /opt/postgres/9.3/data/pg_<u></u>archive/%f %p&quot; primary_conninfo_opt=&quot;<u></u>keepalives_idle=60 keepalives_interval=5 keepalives_count=5&quot; master_ip=&quot;172.16.111.120&quot; stop_escalate=&quot;0&quot; \<br>

         op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot; \<br>
         op monitor interval=&quot;11s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op monitor interval=&quot;10s&quot; role=&quot;Master&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op promote interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op demote interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot; \<br>
         op notify interval=&quot;0s&quot; timeout=&quot;60s&quot;<br>
primitive pingCheck ocf:pacemaker:ping \<br>
         params name=&quot;default_ping_set&quot; host_list=&quot;172.16.0.1&quot; multiplier=&quot;100&quot; \<br>
         op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op monitor interval=&quot;2s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;ignore&quot;<br>
primitive vip-master ocf:heartbeat:IPaddr2 \<br>
         params ip=&quot;172.16.111.110&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \<br>
         op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;<br>
primitive vip-rep ocf:heartbeat:IPaddr2 \<br>
         params ip=&quot;172.16.111.120&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \<br>
         meta migration-threshold=&quot;0&quot; \<br>
         op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;stop&quot; \<br>
         op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;<br>
primitive vip-slave ocf:heartbeat:IPaddr2 \<br>
         params ip=&quot;172.16.111.111&quot; nic=&quot;eth0&quot; cidr_netmask=&quot;24&quot; \<br>
         meta resource-stickiness=&quot;1&quot; \<br>
         op start interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op monitor interval=&quot;10s&quot; timeout=&quot;60s&quot; on-fail=&quot;restart&quot; \<br>
         op stop interval=&quot;0s&quot; timeout=&quot;60s&quot; on-fail=&quot;block&quot;<br>
group master-group vip-master vip-rep \<br>
         meta ordered=&quot;false&quot;<br>
ms msPostgresql pgsql \<br>
         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;<br>
clone clnPingCheck pingCheck<br>
location rsc_location-1 vip-slave \<br>
         rule $id=&quot;rsc_location-1-rule&quot; 200: pgsql-status eq HS:sync \<br>
         rule $id=&quot;rsc_location-1-rule-0&quot; 190: pgsql-status eq HS:async \<br>
         rule $id=&quot;rsc_location-1-rule-1&quot; 100: pgsql-status eq PRI \<br>
         rule $id=&quot;rsc_location-1-rule-2&quot; -inf: not_defined pgsql-status \<br>
         rule $id=&quot;rsc_location-1-rule-3&quot; -inf: pgsql-status ne HS:sync and pgsql-status ne PRI and pgsql-status ne HS:async<br>
location rsc_location-2 msPostgresql \<br>
         rule $id=&quot;rsc_location-3-rule&quot; -inf: not_defined default_ping_set or default_ping_set lt 100<br>
colocation rsc_colocation-1 inf: msPostgresql clnPingCheck<br>
colocation rsc_colocation-2 inf: master-group msPostgresql:Master<br>
order rsc_order-1 0: clnPingCheck msPostgresql<br>
order rsc_order-2 0: msPostgresql:promote master-group:start symmetrical=false<br>
order rsc_order-3 0: msPostgresql:demote master-group:stop symmetrical=false<br>
property $id=&quot;cib-bootstrap-options&quot; \<br>
         no-quorum-policy=&quot;ignore&quot; \<br>
         stonith-enabled=&quot;false&quot; \<br>
         crmd-transition-delay=&quot;0s&quot; \<br>
         dc-version=&quot;1.1.6-<u></u>9971ebba4494012a93c03b40a2c58e<u></u>c0eb60f50c&quot; \<br>
         cluster-infrastructure=&quot;<u></u>openais&quot; \<br>
         expected-quorum-votes=&quot;2&quot; \<br>
         last-lrm-refresh=&quot;1389301940&quot;<br>
rsc_defaults $id=&quot;rsc-options&quot; \<br>
         resource-stickiness=&quot;INFINITY&quot; \<br>
         migration-threshold=&quot;1&quot;<br>
<br>
crm_mon -Afr:<br>
============<br>
Last updated: Fri Jan 10 09:46:29 2014<br>
Last change: Fri Jan 10 09:46:29 2014 by root via crm_attribute on jboss-test<br>
Stack: openais<br>
Current DC: jboss-test - partition with quorum<br>
Version: 1.1.6-<u></u>9971ebba4494012a93c03b40a2c58e<u></u>c0eb60f50c<br>
2 Nodes configured, 2 expected votes<br>
7 Resources configured.<br>
============<br>
<br>
Online: [ jboss-test jboss-test2 ]<br>
<br>
Full list of resources:<br>
<br>
  Clone Set: clnPingCheck [pingCheck]<br>
      Started: [ jboss-test jboss-test2 ]<br>
  Master/Slave Set: msPostgresql [pgsql]<br>
      Masters: [ jboss-test ]<br>
      Slaves: [ jboss-test2 ]<br>
vip-slave       (ocf::heartbeat:IPaddr2):       Started jboss-test2<br>
  Resource Group: master-group<br>
      vip-master (ocf::heartbeat:IPaddr2):       Started jboss-test<br>
      vip-rep    (ocf::heartbeat:IPaddr2):       Started jboss-test<br>
<br>
Node Attributes:<br>
* Node jboss-test:<br>
     + default_ping_set                  : 100<br>
     + master-pgsql:0                    : 1000<br>
     + pgsql-data-status                 : LATEST<br>
     + pgsql-master-baseline             : 0000000039004DF0<br>
     + pgsql-status                      : PRI<br>
* Node jboss-test2:<br>
     + default_ping_set                  : 100<br>
     + master-pgsql:1                    : -INFINITY<br>
     + pgsql-data-status                 : STREAMING|ASYNC<br>
     + pgsql-status                      : HS:async<br>
<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/<u></u>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/<u></u>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
</blockquote>
<br>
<br>
-- <br>
------------------------------<u></u>----------------------<br>
 東 一彦<br>
  NTT OSSセンタ 基盤技術ユニット 高信頼担当<br>
  (SV総研 ソフトウェアイノベーションセンタ OSS推進PJ)<br>
 <a href="mailto:Mail%3Ahigashi.kazuhiko@lab.ntt.co.jp" target="_blank">Mail:higashi.kazuhiko@lab.ntt.<u></u>co.jp</a><br>
 Tel :03-5860-5135<br>
 〒108-8019 東京都港区港南1-9-1 NTT品川TWINSビル11階<br>
------------------------------<u></u>----------------------<br>
<br>
______________________________<u></u>_________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/<u></u>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/<u></u>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>