Friday, December 23, 2011

Postgresql - pgpool, repmgr - the failback process

The process of failback refers to attaching a formerly detached (due to failover) back to the cluster.

Using repmgr the process of failback, comes to this:

repmgr -D /var/lib/pgsql/9.0 --force standby clone node1

The rationale behind this:


And if a previously failed node becomes available again, such as the lost node1 above, you can get it to resynchronize by only copying over changes made while it was down . That happens with this what's called a forced clone, which overwrites existing data rather than assuming it starts with an empty database directory tree:

This can be much faster than creating a brand new node that must copy over every file in the database.


+ Of course, in the detached node, the database server is in shutdown state. Then you do the force clone and then start the database up.

Behind the scenes I guess repmgr writes the appropriate recovery.conf file so as to tell the newly incorporated node to follow the cluster's master.

No comments:

Post a Comment