<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</mata><style type="text/css">
* {box-sizing:border-box;}
body {font-family: Calibri;}
</style>
</head>
<body>
<div></div>
<div name="AnyOffice-Background-Image" style="border-top:1px solid #B5C4DF;padding:8px; background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABBCAYAAAAQTc7lAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2&#43;SX8VGAAAAN0lEQVR42mJ48u7PfyYGBoZ/cOIvKgsb8QeVhZ/4jYX7GwsXpxh&#43;gghTcLoFJ4HmS2wEUlgBBgAjPkNRQlGPfAAAAABJRU5ErkJggg==); background-repeat: repeat-x;">
<div style="word-break:break-all;"><br>
</div>
</div>
<div name="mail_hist_content" style="word-wrap:break-word;">
<div lang="ZH-CN" link="#0563C1" vlink="#954F72" style="">
<div class="WordSection1">
<p class="MsoNormal" align="left" style="text-align:left"><span lang="EN-US"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">Hi,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">I was using pgpool4.0.6 &#43; postgres10.5 to implement database HA. And it is accessed frequently by my Java Application (let’s call it appJ).</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">Here is my problem:</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">I assumed pgpool shall detect the database error, promote standby so that the user/application could not even sense the error. When I shutdown the primary, the standby is promoted immediately.
 New connections can be established. Everything seems work fine. But appJ log shows that SQLException occurred. SQLs supposed to be done are discarded.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">I tried both master-slave mode (master_slave_mode = on, master_slave_sub_mode = stream, relication_mode = off) and
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">replication mode (maste_slave_mode = off, replication_mode = on). The problem is not solved.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">Is there any way to solve it (with out improve appJ code)?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">By the way, I find pgpool running modes quite confusing.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"><a href="https://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html" target="_BLANK">https://www.pgpool.net/docs/latest/en/html/configuring-pgpool.html</a>
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"><a href="https://www.pgpool.net/docs/latest/en/html/runtime-config-running-mode.html" target="_BLANK">https://www.pgpool.net/docs/latest/en/html/runtime-config-running-mode.html</a></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">especially stream replication mode, replication mode, master-slave mode. What are connections and differences?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas"></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">Thanks,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:Consolas">Xie Bin</span></p>
</div>
</div>
</div>
</body>
</html>