<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div><div>I cannot get this to work neither, I tried various combination of parameters. Once the primary is stopped pgpool does not accept connections at all. </div><div><br></div><div>In particular, if I set the failover_command to '' (empty string) then when the primary is stopped pgpool starts searching for a new primary (<span>find_primary_node: checking backend no x repeated in the log) but in the meantime it does not accept connections.</span></div><div><span><br></span></div><div>Another solution to this problem is to not use pgpool but use a connection string of the form</div><div><br></div><div>postgresql://user:secret@host1:5432;host2:5432/somedb?target_session_attrs=any</div><div><br></div><div><a href="https://paquier.xyz/postgresql-2/postgres-10-libpq-read-write/" rel="nofollow" target="_blank" class="">https://paquier.xyz/postgresql-2/postgres-10-libpq-read-write/</a><br></div><div><br></div><div><br></div><div>but I am not sure all clients support this format (the nodejs pg-node does not). </div><div><br></div><div class="ydp40a86b2asignature">Pierre</div></div>
        <div><br></div><div><br></div>
        
        </div><div id="ydp981e2c0byahoo_quoted_0540816913" class="ydp981e2c0byahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, June 20, 2018, 5:50:06 PM GMT+2, Andre Piwoni <apiwoni@webmd.net> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="ydp981e2c0byiv8782646484"><div><div dir="ltr"><div>Wolf,</div><div>Do you mind sharing relevant configuration and version of pgpool you are using? Do you have more than one slave?</div><div><br clear="none"></div>I have tried the following combinations:<div><br clear="none"></div><div>backend_flag0 = 'ALWAYS_MASTER|DISALLOW_TO_FAILOVER'<br clear="none"></div><div>backend_flag1 = 'DISALLOW_TO_FAILOVER'<br clear="none"></div><div><br clear="none"></div><div>

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">backend_flag0 = 'ALWAYS_MASTER'</span>

<br clear="none"></div><div>

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">backend_flag1 = 'DISALLOW_TO_FAILOVER'</span>

<br clear="none"></div><div><br clear="none"></div><div>

<div style="font-size:small;text-decoration-color:initial;"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">backend_flag0 = 'ALWAYS_MASTER'</span><span> </span><br clear="none"></div><div style="font-size:small;text-decoration-color:initial;"><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-color:initial;float:none;display:inline;">backend_flag1 = 'ALLOW_TO_FAILOVER'</span><span> </span></div><div style="font-size:small;text-decoration-color:initial;"><span><br clear="none"></span></div><div style="text-decoration-color:initial;">master_slave_mode = on<br clear="none"></div><div style="text-decoration-color:initial;">master_slave_sub_mode = 'stream'<br clear="none"></div><div style="text-decoration-color:initial;"><br clear="none"></div><div style="text-decoration-color:initial;">sr_check_period = 0 and default sr_check_period = 10<br clear="none"></div><div style="text-decoration-color:initial;"><div>health_check_period = 0<br clear="none"></div></div>

failover_command = ''<br clear="none"></div><div>fail_over_on_backend_error = off and fail_over_on_backend_error = on<br clear="none"></div></div><div class="ydp981e2c0byiv8782646484gmail_extra"><br clear="none"><div class="ydp981e2c0byiv8782646484yqt6508780117" id="ydp981e2c0byiv8782646484yqtfd09636"><div class="ydp981e2c0byiv8782646484gmail_quote">On Wed, Jun 20, 2018 at 8:40 AM, Wolf Schwurack <span dir="ltr"><<a shape="rect" href="mailto:wolf@uen.org" rel="nofollow" target="_blank">wolf@uen.org</a>></span> wrote:<br clear="none"><blockquote class="ydp981e2c0byiv8782646484gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes it is possible I have all my Pgpool hosts setup that way. My setup is a streaming replica and I don't apply the failover.sh script. If the master goes down pgpool fails over to the standby in readonly mode. <br clear="none">
<br clear="none">
<br clear="none">
Wolfgang Schwurack<br clear="none">
Database/System Administrator<br clear="none">
Utah Education Network<br clear="none">
801-587-9444<br clear="none">
<a shape="rect" href="mailto:wolf@uen.org" rel="nofollow" target="_blank">wolf@uen.org</a><br clear="none">
<div><div class="ydp981e2c0byiv8782646484h5"> <br clear="none">
<br clear="none">
<br clear="none">
On 6/19/18, 9:48 PM, "<a shape="rect" href="mailto:pgpool-general-bounces@pgpool.net" rel="nofollow" target="_blank">pgpool-general-bounces@ pgpool.net</a> on behalf of Bo Peng" <<a shape="rect" href="mailto:pgpool-general-bounces@pgpool.net" rel="nofollow" target="_blank">pgpool-general-bounces@ pgpool.net</a> on behalf of <a shape="rect" href="mailto:pengbo@sraoss.co.jp" rel="nofollow" target="_blank">pengbo@sraoss.co.jp</a>> wrote:<br clear="none">
<br clear="none">
    Which version of Pgpool-II do you use?<br clear="none">
    It also happened by latest version of Pgpool-II 3.7.4?<br clear="none">
<br clear="none">
    On Tue, 19 Jun 2018 20:00:58 -0700<br clear="none">
    Andre Piwoni <<a shape="rect" href="mailto:apiwoni@webmd.net" rel="nofollow" target="_blank">apiwoni@webmd.net</a>> wrote:<br clear="none">
<br clear="none">
    > I have been trying to figure how can I configure PgPool with one primary<br clear="none">
    > and one hot-standby slave to route read-requests to hot-standby when<br clear="none">
    > primary is down without any failover. Is it currently possible? Please<br clear="none">
    > don't ask why.<br clear="none">
    > <br clear="none">
    > Thank you,<br clear="none">
    > Andre Piwoni<br clear="none">
<br clear="none">
<br clear="none">
    -- <br clear="none">
    Bo Peng <<a shape="rect" href="mailto:pengbo@sraoss.co.jp" rel="nofollow" target="_blank">pengbo@sraoss.co.jp</a>><br clear="none">
    SRA OSS, Inc. Japan<br clear="none">
<br clear="none">
</div></div>    ______________________________ _________________<br clear="none">
    pgpool-general mailing list<br clear="none">
    <a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none">
    <a shape="rect" href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/ listinfo/pgpool-general</a><br clear="none">
<br clear="none">
<br clear="none">
</blockquote></div><br clear="none"></div></div></div></div><div class="ydp981e2c0byqt6508780117" id="ydp981e2c0byqtfd74630">_______________________________________________<br clear="none">pgpool-general mailing list<br clear="none"><a shape="rect" href="mailto:pgpool-general@pgpool.net" rel="nofollow" target="_blank">pgpool-general@pgpool.net</a><br clear="none"><a shape="rect" href="http://www.pgpool.net/mailman/listinfo/pgpool-general" rel="nofollow" target="_blank">http://www.pgpool.net/mailman/listinfo/pgpool-general</a><br clear="none"></div></div>
            </div>
        </div></div></body></html>