On Thu, 27 Jan 2011 13:09:57 +0100 Guillaume Lelarge <[email protected]> wrote:
> Hi, > > One of my customers asks me today why pgpool doesn't check, from time to > time, that the backend is now available in connection pool mode. > > Here is what we did with a pgpool 3.0.1, configured only for connection > pooling and health checking: > > * start postgresql (pg_ctl start) > * start pgpool (pgpool -f etc/pgpool.conf start) > * every connection works fine > * stop postgresql (pg_ctl start) > * health check detects the unavailability of the backend > and changes status of node 0 to 3 > * no connection, which is good because backend is unavailable > * start postgresql (pg_ctl start) > * and the node still remains in status 3. > > What I would like to have is a way to check if the backend is now > available. And reattach it if it is. All intern to pgpool. Any reason > why not to do so? I don't know the reason. However, there was such a demand since before. And I think that detaching no node is better than reattach a node. The reason is because latency for reattaching does not occur. I attach the prototype patch which I made before. This patch adds following new parameter to pgpool.conf. # If true, trigger failover when connecting to master node fails or # reading/writing data toward master node fails. If false, does not # trigger failover in that case. # This parameter has effect in raw mode and master/slave mode. failover_if_master_fails = true > I can have misread the documentation, and I understand why this cannot > happen in replication mode or master/slave mode. But in connection > pooling only mode, I don't get it. > > If it seems to be a nice feature to have, I'm interested in working on this. Any comments and improvement for attached patch are welcome. -- Toshihiro Kitagawa SRA OSS, Inc. Japan
failover_if_master_fails.patch
Description: Binary data
_______________________________________________ Pgpool-hackers mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-hackers
