[Pgpool-general] procedures to reboot a node

Tatsuo Ishii ishii at sraoss.co.jp
Mon May 4 02:00:31 UTC 2009


> Have you thought of using something lightweight, like sqlite, to dump the 
> queries into a queue and process those through to the down-node after it 
> comes back up again?

Yes, but I think it's not that trivial. First we should only apply
committed queries. Second, we need to "serialize" queries otherwise
the result will vary.

> > 1) Shutdown pgpool and all DB nodes. Physically copy the one of the
> >   database cluster into the rebooted node. Start all the db nodes,
> >   and finally start pgpool. With this procedure you don't need to set
> >   up online recovery.
> 
> Ouch, for a *very* large database, that could be painful, no? :)

Yes, that's why online recovery was born:-)

> > 2) Setup online recovery. Stop the DB node you want to resync if it
> >   does not already stop. Use pcp_recovery_node to resync the
> >   node. After recovery, the node will automatically start.
> 
> Okay, so while in recovery, what happens?  The 'main node' continues to 
> run fine while the recovery node is being recovered, 

Actually there are two stages in recovery. In the "first stage" main
node continues run fine. In the "second stage" main node does not stop
but waits until incoming connectons are disconnected. This is
necessary to ensure the recovery procedure generates consistent data.

What does your DB application look like? If it is "connect/does
something usefull/disconnet" type, then there should be no
problem. But if it keeps on connecting to database and never
disconnet, that will be a problem.

> and once finished, 
> pgpool will resume using both nodes?

Yes.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list