[pgpool-general: 1323] hot recovery of a node

Gilbert Soucy gsoucy at 36pix.com
Thu Jan 17 10:07:51 JST 2013


I hope this is the place whee I can ask general questions about pgpool. I
could not find a forum. Otheriwse, please let me know where I should go to
get help

Here is my question:

I am trying to setup pgpool II with 2 postgres nodes using replication and
load balancing. I have setup the watch dog to switch the virtual IP
automatically in case of failure. The 2 postgres nodes run on 2 identical

Everything works fine except for the recovery which I dont quite undestand.
I have installed and configured the scripts:


Then I simulate a failure : I shutdown one of the postgres nodes. This gets
detected fine and pgpool is still functional with the remaining node (which
can still accept connections).

When I try to recover, it does not work as I expected. I thought that we
could recover *while pgpool keeps accepting requests*. (at least for stage
1 of the recover). So, I simulated this by inserting a new line in a table
of my database just before the end of the basebackup.sh script  (just *after
* the rsync and *before* the pg_stop_backup() ).

So, my basebackup.sh script looks like:


*psql -U postgres -p 5432 -c "insert into users values (3000, 'def1');"
myDB      # this line was added to basebackup.sh to simulate a transaction
during a recover, stage 1      *

psql -U postgres -p 5432 -c "SELECT pg_stop_backup()" postgres

I then try to recover my failed node with:

/usr/local/bin/pcp_recovery_node -d 15 9898 pgpool pgpool 1

Which succeeds. However, when I look at the content of the databases, only
the master database has the new line  "3000  test" (purposely added in my
basebackup.sh script). The recovered database has all other lines but not
this one. So the recovery is not complete in my opinion (or I dont
understand what it is supposed to do).

Am I wrong in expecting that this should work (i.e. after the recover, the
2 database should be completely in sync) ?

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20130116/1616e4a6/attachment.html>

More information about the pgpool-general mailing list