[pgpool-committers: 3127] pgpool: First cut of Proposal: minimize process restart when fail over

Tatsuo Ishii ishii at postgresql.org
Thu Apr 7 10:39:15 JST 2016


First cut of Proposal: minimize process restart when fail over occurs

This commit creates necessary infrastructure toward the goal:

- Add a flag to the Request info area on the shared memory, which is
  used to distinguish if the request is originated by a fail over or a
  switch over. The flag is called "request_details", a 8 bit unsigned
  char variable. Currently only the least significant bit is used. Use
  of the bit must be through REQ_DETAIL_SWITCHOVER define (if the bit
  is set, the request is originated by a switch over).

- Add a boolean parameter "switch_over" to indicate the request is
  originated by a switch over to:
  register_node_operation_request
  degenerate_backend_set
  degenerate_backend_set_ex

- Modify register_node_operation_request to set the switch over flag.

- Modify failover and to retrieve the switch over flag. Currently it
  just prints a debug message.

More work will need to accomplish the goal...
2016-04-07 09:52:39: pid 15692: DEBUG:  failover handler
2016-04-07 09:52:39: pid 15692: DETAIL:  kind: 1 flags: 1 node_count: 1 index:0

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=b5c4ed11ffb1fdf2c416f9b9b2a8184a992d9523

Modified Files
--------------
src/include/pool.h                |  9 +++++---
src/main/pgpool_main.c            | 43 +++++++++++++++++++++++++++------------
src/pcp_con/pcp_worker.c          |  6 +++---
src/protocol/pool_process_query.c |  2 +-
src/protocol/pool_proto_modules.c |  4 ++--
src/watchdog/watchdog.c           |  4 ++--
6 files changed, 44 insertions(+), 24 deletions(-)



More information about the pgpool-committers mailing list