[pgpool-general: 6140] Re: PgPool in streaming replication mode without failover and primary down

Wolf Schwurack wolf at uen.org
Mon Jun 25 22:22:19 JST 2018


Did you enable watchdog? You need to have watchdog enable, All your connection string need to point to the watchdog port you set in pgpool.conf

From: Pierre Timmermans <ptim007 at yahoo.com>
Date: Sunday, June 24, 2018 at 1:54 PM
To: Wolfgang Schwurack <wolf at uen.org>, Andre Piwoni <apiwoni at webmd.net>
Cc: "pgpool-general at pgpool.net" <pgpool-general at pgpool.net>
Subject: Re: [pgpool-general: 6131] Re: PgPool in streaming replication mode without failover and primary down

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.

In particular, if I set the failover_command to '' (empty string) then when the primary is stopped pgpool starts searching for a new primary (find_primary_node: checking backend no x repeated in the log) but in the meantime it does not accept connections.

Another solution to this problem is to not use pgpool but use a connection string of the form

postgresql://user:secret@host1:5432;host2:5432/somedb?target_session_attrs=any

https://paquier.xyz/postgresql-2/postgres-10-libpq-read-write/


but I am not sure all clients support this format (the nodejs pg-node does not).

Pierre


On Wednesday, June 20, 2018, 5:50:06 PM GMT+2, Andre Piwoni <apiwoni at webmd.net> wrote:


Wolf,
Do you mind sharing relevant configuration and version of pgpool you are using? Do you have more than one slave?

I have tried the following combinations:

backend_flag0 = 'ALWAYS_MASTER|DISALLOW_TO_FAILOVER'
backend_flag1 = 'DISALLOW_TO_FAILOVER'

backend_flag0 = 'ALWAYS_MASTER'
backend_flag1 = 'DISALLOW_TO_FAILOVER'

backend_flag0 = 'ALWAYS_MASTER'
backend_flag1 = 'ALLOW_TO_FAILOVER'

master_slave_mode = on
master_slave_sub_mode = 'stream'

sr_check_period = 0 and default sr_check_period = 10
health_check_period = 0
failover_command = ''
fail_over_on_backend_error = off and fail_over_on_backend_error = on

On Wed, Jun 20, 2018 at 8:40 AM, Wolf Schwurack <wolf at uen.org<mailto:wolf at uen.org>> wrote:
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.


Wolfgang Schwurack
Database/System Administrator
Utah Education Network
801-587-9444
wolf at uen.org<mailto:wolf at uen.org>



On 6/19/18, 9:48 PM, "pgpool-general-bounces@ pgpool.net<mailto:pgpool-general-bounces at pgpool.net> on behalf of Bo Peng" <pgpool-general-bounces@ pgpool.net<mailto:pgpool-general-bounces at pgpool.net> on behalf of pengbo at sraoss.co.jp<mailto:pengbo at sraoss.co.jp>> wrote:

    Which version of Pgpool-II do you use?
    It also happened by latest version of Pgpool-II 3.7.4?

    On Tue, 19 Jun 2018 20:00:58 -0700
    Andre Piwoni <apiwoni at webmd.net<mailto:apiwoni at webmd.net>> wrote:

    > I have been trying to figure how can I configure PgPool with one primary
    > and one hot-standby slave to route read-requests to hot-standby when
    > primary is down without any failover. Is it currently possible? Please
    > don't ask why.
    >
    > Thank you,
    > Andre Piwoni


    --
    Bo Peng <pengbo at sraoss.co.jp<mailto:pengbo at sraoss.co.jp>>
    SRA OSS, Inc. Japan
    ______________________________ _________________
    pgpool-general mailing list
    pgpool-general at pgpool.net<mailto:pgpool-general at pgpool.net>
    http://www.pgpool.net/mailman/ listinfo/pgpool-general<http://www.pgpool.net/mailman/listinfo/pgpool-general>


_______________________________________________
pgpool-general mailing list
pgpool-general at pgpool.net<mailto:pgpool-general at pgpool.net>
http://www.pgpool.net/mailman/listinfo/pgpool-general
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20180625/0f62162b/attachment.html>


More information about the pgpool-general mailing list