[Pgpool-hackers] Automatic reattachment of the node in connection pooling mode
Toshihiro Kitagawa
kitagawa at sraoss.co.jp
Fri Jan 28 00:02:46 UTC 2011
On Thu, 27 Jan 2011 13:09:57 +0100
Guillaume Lelarge <guillaume at lelarge.info> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: failover_if_master_fails.patch
Type: application/octet-stream
Size: 12867 bytes
Desc: not available
URL: <http://pgfoundry.org/pipermail/pgpool-hackers/attachments/20110128/d650e1a5/attachment-0001.obj>
More information about the Pgpool-hackers
mailing list