[pgpool-hackers: 1223] Preventing disconection to clients on failover

Tatsuo Ishii ishii at postgresql.org
Wed Dec 16 18:15:00 JST 2015


Currently pgpool-II always disconnects to clients whenever fail over
happens because all the pgpool-II child process restart in the case.
This is annoying and it's been one of the tops 3 compliants from
users.

I think we could mitigate it in a certain condition:

1) Pgpool-II runs in the streaming replication mode

2) The failed node is one of standbys (not primary)

3) We accept that clients connecting to the standby cannot continue
   the processing thus it will be disconnected from pgpool-II

If all of the conditions above are satisfied, by changing pgpool-II in
the way below, some of clients will not be suffered by the
disconnection problem on fail over.

1) Let pgpool-II connects to the primary node and the load balancing
   node only (currently pgpool-II connects to all live nodes).

2) When a fail over happens, lucky clients connecting to other standby
   servers will not be affected by the fail over.

Question is, this is worth to implement or not (are users getting
happier?). In a common configurations such as two DB node
configuration, probability for the occurrence of the disconnecting
problem would be 50% in average, because it is expected that half of
clients are likely connecting to the failing standby (Of course the
more we add standby servers, the smaller the probability of
disconnection is).

Maybe users could change the standby's weight parameter to 0, to
prevent clients connect to the failing standby.

Comments, thoughts?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list