[Pgpool-general] Trying to understand how pgpool does failover.

Jaume Sabater jsabater at gmail.com
Mon Mar 30 12:41:31 UTC 2009


2009/3/29 Tim Uckun <timuckun at gmail.com>:

All your questions are answered in the documentation, but here we go anyway...

> My primary confusion comes from the fact that once a node has fallen down
> pgpool starts a recovery process which copies over the files from another
> database. Does this mean I should not set up log shipping between the two
> servers?

The online recovery process is not started automatically by pgpool-II,
but manually by the sysadmin. It can be done in several ways, being
PITR one of them. PITR uses binary logs from PostgreSQL. Therefore,
you should not set up log shipping, but you will need log archiving if
you are going to use PITR.

> During the second stage of recovery pgpool stops taking statements. How long
> does that take? Do the clients get errors during that time? Why doesn't it
> simply queue the requests to the node that is down and send them when the
> node is back up?

Depends on the amount of changes the database in the master node
suffered while the database was being transferred or sync'ed with the
slave node. Client petitions are queued and attended when the process
is complete.

Regarding your last question, Tatsuo will have to answer that.

> If I use pgpool itself for replication (as opposed to only for load
> balancing) how are non deterministic values like now, and serial values
> dealt with. Is there anything I should to my applicaiton to deal with non
> deterministic updates?

That is a restriction of pgpool-II, therefore you cannot. They would
lead to data mismatch among backends. You want to use a business logic
layer in front of the database and avoid using serial, now, etc. in
the back-ends, therefore use the database purely as data storages. Or
you can lock the tables while the insert is happening... pgpool-II
automatically does that from version 2.2 for certain types.

-- 
Jaume Sabater
http://linuxsilo.net/

"Ubi sapientas ibi libertas"


More information about the Pgpool-general mailing list