<div dir="ltr">Hi Tatsuo,<div><br></div><div>Tried setting weight to 0 for the master node. But still transaction is waiting for the slave node, which is the default behavior of synchronous streaming replication. If I forcibly stop it then modifications can be seen in the master node. Any suggestions ? </div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br><div>Thanks,</div><div>Anushka</div></div></div></div>
<br><div class="gmail_quote">On Thu, Mar 16, 2017 at 4:20 AM, Tatsuo Ishii <span dir="ltr">&lt;<a href="mailto:ishii@sraoss.co.jp" target="_blank">ishii@sraoss.co.jp</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">&gt; Hi all,<br>
&gt;<br>
&gt; I have a synchronous streaming replication environment which is implemented<br>
&gt; using inbuilt replication mechanism in postgresql. There is a requirement<br>
&gt; that I need to fail the data modification transactions on master node if<br>
&gt; the slave node is down. (ie: transactions should commit when only both<br>
&gt; servers are up and running)<br>
&gt;<br>
&gt; Please let me know whether there is a way to identify slave node status and<br>
&gt; fail the transaction using pgpool ?<br>
<br>
</span>There&#39;s no direct way to do that for now.<br>
<br>
However, if you always start an explicit transaction, and set load<br>
balance weight for master to 0, Pgpool-II always starts a transaction<br>
for not only primary, but for standby as well. So when user sends a<br>
commit to Pgpool-II, it will send the commit to both primary and<br>
standby. If the standby is not up and running (or Pgpool-II cannot<br>
reach to the standby), the commit request on the primary will fail.<br>
<br>
I have not tested it yet though.<br>
<br>
Best regards,<br>
--<br>
Tatsuo Ishii<br>
SRA OSS, Inc. Japan<br>
English: <a href="http://www.sraoss.co.jp/index_en.php" rel="noreferrer" target="_blank">http://www.sraoss.co.jp/index_<wbr>en.php</a><br>
Japanese:<a href="http://www.sraoss.co.jp" rel="noreferrer" target="_blank">http://www.sraoss.co.<wbr>jp</a><br>
</blockquote></div><br></div>