[Pgpool-hackers] Proposal: failover control directive

Tatsuo Ishii ishii at sraoss.co.jp
Thu Jun 23 04:28:04 UTC 2011


> Hi pgpool hackers,
> 
> I would like to propose new directive to control failover behavior for
> 3.1.
> 
> Background:
> 
> Certain configration such as master/slave mode with Slony-I requires
> master node not to failover. For this purpose the master node is
> protected by HA(High Availability) software, it is desired for
> pgpool-II disregard failover event on the master node.
> 
> Another use case is, D/W house like configuration with streaming
> replication. Primary node is not often updated and standby servers are
> used for load balancing. Sometimes it is not neccessary to promoto a
> standby when the primary goes down, rather waiting for the primary
> wakes up.
> 
> Proposal:
> Add new directive to backend_*. to control the failover behavior.
> 
> backend_hostname0 = 'example.com'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_flag0 = 'flags' <--- proposed new directive
> 
> "flags" can be just a "allow failover or not" for now, but I would
> like to allow to ORing several flags for the future porpose. At this
> poing the flag would be:
> 
> ALLOW_TO_FAILOVER (allow to failover, default)
> or
> NEVER_FAILOVER (do not allow to failover)
> 
> Comments?

Ok, I have created patches for this.

- Add new directive. If backend_flag0 = 'DISALLOW_TO_FAILOVER'(for
  example) is specified, no failover (including health checking,
  connection errors, pcp_detach_node) will happen. If you want to
  allow failover you can specify backend_flag0 =
  'ALLOW_TO_FAILOVER'. For backward compatibility sake, if
  backend_flag0 directive is omitted, it is regarded as backend_flag0
  = 'ALLOW_TO_FAILOVER' is specified.

- the directive can only be changed at pgpool starting up.

- No pool_status patches are included (yet).

- No documentation patches are included (yet).
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool.patch
Type: text/x-patch
Size: 12253 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110623/46d39a99/attachment.bin>


More information about the Pgpool-hackers mailing list