[pgpool-general: 2676] Automatically attaching a degenerate node on failback

Anupama Ramaswamy anumr_0123 at yahoo.com
Sun Mar 30 20:29:52 JST 2014


Hi,

I have a pgpool setup with 2 DB nodes with Postgres streaming replication. So my config is
load_balance_mode = on
master_slave_mode = on
master_slave_sub_mode ='stream'

When the standby disconnects (postgres is stopped / n/w is down on the standby or standby is sthutdown), pgpool correctly degenerates the standby node. pgpool directs all queries (updates and select) to the primary. 

Lets say the standby node comes backup after say an hour later. pgpool detects that the node / service is up, but keeps the node detached from the pool. Is there a way to attach the node automatically to the pool when the node comes backup. A script which can call pcp_attach_node should suffice for my purpose. Since I am using streaming replication, that will take care of syncing the data to the standby, anyway.

I thought failback_command will be of use for this, but just learnt that failback_command will be called only after the node is attached.
I don't want to use the online recovery option, because I want master failback to be a manual step.


How should I do an automatic re-attach of the secondary when it comes back up ?

Thanks for your help.
Anupama.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20140330/199d3a58/attachment.html>


More information about the pgpool-general mailing list