Tuesday, August 23, 2011

pgpool - online recovery / STONITH / non-replicated databases

Folowing up the pgpool-II_replication_for_beginners tutorial.

pgpool - online recovery

  • what is it for? for reattaching a node  that has been degenerated or to attach a new node.


  • the parameters backend_XYZ in pgpool.conf have been redefined and pgpool reloaded.

  • enable pgpool online recovery on every node by compiling and installing the pgpool-recovery.sql script into the template1 database.

  • the sample scripts (in /pgpool-II-2.1/sample) should be contained inside the folder pointed by $PGDATA.

tip. checkout the sample scripts provided in the installation tarball.


The term STONITH is an acronym for "Shoot the Other Node in the Head". This is a concept related to clusters that refers to the situation in which failover occurs, the backup server takes over the role of master and then the old master restarts. STONITH is the mechanism  to inform the old master that is no longer the primary.

pgpool non-replicated databases

So,  what happens if while connected to pgpool you try to alter a database in the master (the node where pgpool is running) that doesn't exist in the slaves (the other nodes) ? pgpool closes the connection and won't even let you to connect to a database that doesn't exist on the slaves.

No comments:

Post a Comment