[Pgpool-general] procedures to reboot a node

Tatsuo Ishii ishii at sraoss.co.jp
Mon May 4 01:34:52 UTC 2009


> This past week, I implemented a replication/load balancing cluster using 
> pgpool-II to improve performance of the spam/virus scanning engine used 
> behind the @postgresql.org mailing lists (among other things) ... initial 
> setup was a breeze, but now I want to make sure that I haven't missed 
> something critical here ...

Oh you are using pgpool-II behind postgresql.org? Great!

> ... specifically, what happens if / when I reboot one of the nodes?
> 
> I just did an OS upgrade on one of the physical servers, so I just 
> shutdown everything, to be paranoid, but figure that its not something I 
> should have to do if I have things setup properly.
> 
> I've read teh docs about the 'Online Recovery' ... do I need to set that 
> up, or does pgpool internally handle the fact that one node is down and 
> 'save' the queries until it comes back up and just dump it to node when it 
> comes back up again?

If pgpool continues to accept queries while one of PostgreSQL reboots,
pgpool will automatically disconnects the database node. But pgpool
does not save the queries while the node is down. So you need to
resync the node explicitly. There are two options:

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.

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.

> Also, is there some method of testing that both nodes are 'in sync'?

Currently no. Problem is, there is no way to "freeze" PostgreSQL
servers, which is necessary to compare nodes. Maybe we could implement
the feature by using similar way like online recovery. Ideas are
welcome.
--
Tatsuo Ishii
SRA OSS, Inc. Japan


More information about the Pgpool-general mailing list