pgpool: replication for PostgreSQL
February 20, 2009
Posted by on
I had the “challenge” to evaluate a mechanism to replicate a PostgreSQL database to a second server synchronously. This, let’s say “cluster solution”, should run on top of PostgreSQL and therefore not use a modified PostgreSQL binary (like pg_cluster or cybercluster).
Finally there were two tools left
I had to remove Sequoia, since we don’t use java based applications and from my point of view it is too much overhead to establish a connection to sequoia from a non-java application (you need an additional connector, jdbc bridge). Nevertheless this tool offers great functionality and I think it is perfectly suited for java applications.
Thereby pgpool-II is my preferred tool and after some days working with it, I have to say that it was a good choice :-))
Pgpool is not only replication, it provides you with load-balancing, connection pooling also.
After downloading (link somewhere at the top) you have to compile and install it via “standard linux installation” => configure-make-make install
Afterwards there are only 2 config files to adapt it to your needs. There’s also a web-gui called “pgpoolAdmin” for monitoring and configuring pgpool (currently beta version).
I’ve created a step-by-step documentation on how to install, configure and test pgpool. Please, check it out here.