View Issue Details

IDProjectCategoryView StatusLast Update
0000640Pgpool-IIGeneralpublic2020-09-12 23:01
Reporterpgdude Assigned Tot-ishii  
PrioritynormalSeverityminorReproducibilityN/A
Status assignedResolutionopen 
PlatformLinuxOSUbuntuOS Version20.04 LTS
Product Version4.1.2 
Summary0000640: How to put pgpgool2 in "maintenance mode"?
DescriptionI want to apply a minor upgrade to the primary, quick down and up thang, but I don't want to trigger failover. How can I do it? I'm basically asking how to put a primary in a watchdog configuration without triggering the failover_command?
TagsNo tags attached.

Activities

t-ishii

2020-08-24 21:21

developer   ~0003511

First off all, this is not a forum to ask questions. Please use pgpool-general mailing list instead.

You can use backend_flag parameter to disable failover. For example set:
backend_flag0 = 'DISALLOW_TO_FAILOVER'
and
remove:
backend_flag0 = 'ALLOW_TO_FAILOVER'
in pgpool.conf, then reload it.
See the manual for more details.
After upgrade, you revert the change in pgpool.conf then reload it.

pgdude

2020-08-24 23:41

reporter   ~0003512

Thanks, I realize this is not a forum and will redirect there in the future, but don't you think you might want to add a section in pgpool documentation to address this, how to put pgpool in maintenance mode? For instance, other HA failover tools, like repmgr, have an actual command to put a repmgr cluster in maintenance mode to prevent automatic failover.

To avoid failing over automatically, do I need to change this flag on all PG hosts in the pgpool2 cluster? or just the standbys?

t-ishii

2020-08-26 15:22

developer   ~0003518

You need to change the flag on all PG hosts for which you want avoid failover.

t-ishii

2020-08-28 17:49

developer   ~0003529

> but don't you think you might want to add a section in pgpool documentation to address this, how to put pgpool in maintenance mode?
Done.
https://tatsuo-ishii.github.io/pgpool-II/current/server-temporarily-shutdown.html

pgdude

2020-09-12 23:01

reporter   ~0003560

Slight change to documentation. Right now it says this:

This will take effect by reloading or restarting Pgpool-II. If this flag is set, failover will not happen if the backend is not available. While the backend is not available, clients wil get error message:

     psql: error: could not connect to server: FATAL: failed to create a backend connection
     DETAIL: executing failover on backend

The problem is that it infers you will still get a message that says :DETAIL: executing failover on backend" even if backend is not available due to backend_flag0 = 'DISALLOW_TO_FAILOVER'

Issue History

Date Modified Username Field Change
2020-08-24 20:16 pgdude New Issue
2020-08-24 21:21 t-ishii Note Added: 0003511
2020-08-24 23:41 pgdude Note Added: 0003512
2020-08-26 15:20 t-ishii Assigned To => t-ishii
2020-08-26 15:20 t-ishii Status new => feedback
2020-08-26 15:22 t-ishii Note Added: 0003518
2020-08-28 17:49 t-ishii Note Added: 0003529
2020-09-12 23:01 pgdude Note Added: 0003560
2020-09-12 23:01 pgdude Status feedback => assigned