<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML con formato previo Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLconformatoprevioCar
        {mso-style-name:"HTML con formato previo Car";
        mso-style-priority:99;
        mso-style-link:"HTML con formato previo";
        font-family:Consolas;
        mso-fareast-language:ES;}
span.EstiloCorreo22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:277491195;
        mso-list-template-ids:1227893082;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ES link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>There is a bug on 3.7.2 related with that issue. The core team is working on this. Could you try to downgrade your version with 3.7.1?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>De:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> pgpool-general-bounces@pgpool.net [mailto:pgpool-general-bounces@pgpool.net] <b>En nombre de </b>Bud Curly<br><b>Enviado el:</b> miércoles, 4 de abril de 2018 11:00 a. m.<br><b>Para:</b> pgpool-general@pgpool.net<br><b>Asunto:</b> [pgpool-general: 6014] Fwd: INSERT statements sent to standby<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><div><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>Hi and thanks for your work.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>I use pgpool2 3.7.2 with 2 backend as master-slave mode with native stream replication.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>I think I have an issue whenever I do these steps :<o:p></o:p></span></p><ol start=1 type=1><li class=MsoNormal style='color:#24292E;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;background:white;box-sizing:border-box'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif"'>Node 0 is master, node 1 is slave. Everything goes well.<o:p></o:p></span></li><li class=MsoNormal style='color:#24292E;margin-top:3.0pt;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;background:white;box-sizing:border-box'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif"'>I shut node 0, which causes failover and promote node 1 to the new master. Everything goes well, I still can insert datas here.<o:p></o:p></span></li><li class=MsoNormal style='color:#24292E;margin-top:3.0pt;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1;background:white;box-sizing:border-box'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif"'>I do an online recovery of the node 0. So it goes as standby then. Since here, pgpool send all INSERT statement on the backend 0.<o:p></o:p></span></li></ol><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>Here is pgpool log which demonstrate well the weird behaviour :<o:p></o:p></span></p><pre style='background:#F6F8FA;box-sizing:border-box;word-wrap:normal;border-radius:3px;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;overflow:auto;word-spacing:0px'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>root@srv:~# pgpool -n<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  Setting up socket for <a href="http://0.0.0.0:21042" target="_blank">0.0.0.0:21042</a><o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  Setting up socket for :::21042<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node_repeatedly: waiting for finding a primary node<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: checking backend no 0<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: checking backend no 1<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  find_primary_node: primary node id is 1<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:01: pid 28055:LOG:  pgpool-II successfully started. version 3.7.2 (amefuriboshi)<o:p></o:p></span></code></pre><pre style='background:#F6F8FA'><code><span style='font-size:9.0pt;font-family:Consolas;color:#24292E;border:none windowtext 1.0pt;padding:0cm'>2018-04-04 14:26:10: pid 28075:LOG:  pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 28098 statement: &quot;insert into &quot;***[...]***&quot; message: &quot;cannot execute INSERT in a read-only transaction&quot;<o:p></o:p></span></code></pre><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>The primary node is node 1, however it send INSERT on the standby. If I shut node 0, INSERT are sent to node 1 just well. If I restart node 0, the problem shows up again.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>With&nbsp;<strong><span style='font-family:"Segoe UI","sans-serif"'>select pg_is_in_recovery();</span></strong>&nbsp;and&nbsp;<strong><span style='font-family:"Segoe UI","sans-serif"'>pcp_node_info</span></strong>&nbsp;I can see that node 1 is the master and node 0 is the standby.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>I can manually INSERT on Node 1 directly. On Node 0, I have the same error as expected :&nbsp;<strong><span style='font-family:"Segoe UI","sans-serif"'>cannot execute INSERT in a read-only transaction</span></strong><o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>With&nbsp;<strong><span style='font-family:"Segoe UI","sans-serif"'>log_error_verbosity = verbose</span></strong>&nbsp;I have no revelant information.<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'>Here is my pgpool.conf :<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;background:white;box-sizing:border-box;font-variant-ligatures:normal;font-variant-caps:normal;text-align:start;text-decoration-style:initial;text-decoration-color:initial;word-spacing:0px'><span style='font-size:10.5pt;font-family:"Segoe UI","sans-serif";color:#24292E'><a href="https://github.com/pgpool/pgpool2/files/1875707/pgpool.conf.txt" target="_blank"><span style='color:#0366D6;text-decoration:none'>pgpool.conf</span></a><o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></div></body></html>