[pgpool-general: 6482] Re: pgpool-II does nothing when slave node goes down
ishii at sraoss.co.jp
Thu Mar 28 08:10:20 JST 2019
> Question #1: failover script when stand-by fail.
> In pgpool.conf there is parameter
> failover_command = '' # Executes this command at failover
> But there is no indication what exactly fail means - fail of master-server
> or fail of stand-by server?
> You wrote "When the standby is stopped, pgpool tries to reconnect x times
> ... then it does the failover script..." Where in pgpool.conf you defined
> this script?
The health check parameters.
> Question #2: you wrote "... it detaches the standby".
> I did exactly the same setting as you wrote, but pgpool stil showing
> stand-by as "up" meanwhile it is "down".
> Mayby there is some parameter which exactly tells that stand-by MUST be
> detached when it fails?
That's not an expected behavior.
You should share the pgpool log (with log_min_messages = debug5).
> Question #3: you wrote "I also put the parameter failover_on_backend_error
> = 'off' "
> Why? If "off" than when master fail occurs - no stand-by promotes. Or I
Wrong. Setting this parameter to off does not affect the failover
triggered by health checking.
> вт, 26 мар. 2019 г. в 23:16, Pierre Timmermans <ptim007 at yahoo.com>:
>> Hi Dimitri
>> Did you set-up the health checks ?
>> In my pgpool config I have the following parameters related to the health
>> health_check_period = 10
>> health_check_timeout = 10
>> health_check_user = 'hcuser'
>> health_check_password = 'hcuser'
>> health_check_database = 'postgres'
>> health_check_max_retries = 5
>> health_check_retry_delay = 1
>> I also put the parameter
>> failover_on_backend_error = 'off'
>> And I created the user hcuser on the postgres database
>> When the standby is stopped, pgpool tries to reconnect x times (depending
>> on health_check_max_retries parameter) then it does the failover script
>> (the script does not have to do something because it is not the primary
>> failing) and it detaches the standby. When the standby is started again,
>> pgpool does a failback script (I do nothing in this script) and then it
>> attaches the standby again
>> I believe that if you don't set-up the health-checks pgpool does not
>> detach the standby when it fails (not sure if it is as-designed or not)
>> On Tuesday, March 26, 2019, 3:58:52 PM GMT+1, Dmitry Medvedev <
>> dm.dm.medvedev at gmail.com> wrote:
>> Hello to everyone.
>> A couple of days I've spent trying to understand how pgpool-II works.
>> Tell me, please, principle of operation when slave node goes down.
>> I've read tons of manuals and when master node in my test cluster goes
>> down (or master's network interface goes down) - pgpool does failover
>> actions. Everything is OK and works as expected.
>> But when slave node goes down - pgpool does nothing at all and I receive
>> such answer
>> test=# show pool_nodes;
>> node_id | hostname | port | status | lb_weight | role | select_cnt |
>> load_balance_node | replication_delay | last_status_change
>> 0 | 172.28.30.6 | 5434 | up | 0.500000 | master | 3 |
>> true | 0 | 2019-03-26 17:04:12
>> 1 | 172.28.30.7 | 5434 | up | 0.500000 | slave | 0 |
>> false | 0 | 2019-03-26 17:04:12
>> (2 rows)
>> At the same time slave node is completely down. Not "up"! select * from
>> pg_stat_replication showing (0 rows)
>> Why does pgpool-II does nothing when slave node goes down and how I can
>> change it?
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
More information about the pgpool-general