Fernando, For syncing data during recovery process you need to configure the correct scripts in the recovery_1st_stage_command and recovery_2st_stage_command directives. There is an excellent article wrote by Jaume Sabater (in spanish) explaining this process. take a look at http://linuxsilo.net/articles/postgresql-pgpool.html
i hope it helps! Att, Marcos Davi Reis Mova www.movaomundo.com On Mon, Dec 14, 2009 at 4:31 PM, Fernando Morgenstern <[email protected]> wrote: > > Hello, > I tried that and got a different error. Them i realized that, as all nodes > were down, i should use pcp_attach_node. Things are better now: > Start Pgpool: > [postg...@im-pp2 .ssh]$ pgpool -n -d > /tmp/pgpool.log 2>&1 & > [1] 25350 > Attach node 1: > [postg...@im-pp2 .ssh]$ pcp_attach_node -d 90 localhost 9898 postgres ***** 1 > DEBUG: send: tos="R", len=46 > DEBUG: recv: tos="r", len=21, data=AuthenticationOK > DEBUG: send: tos="D", len=6 > DEBUG: recv: tos="c", len=20, data=CommandComplete > DEBUG: send: tos="X", len=4 > Looks good: > [postg...@im-pp2 .ssh]$ tail -f /tmp/pgpool.log > 2009-12-14 20:16:35 DEBUG: pid 25350: starting health checking > 2009-12-14 20:16:35 DEBUG: pid 25350: health_check: 0 th DB node status: 3 > 2009-12-14 20:16:35 DEBUG: pid 25350: health_check: 1 th DB node status: 1 > 2009-12-14 20:16:35 DEBUG: pid 25350: health_check: 2 th DB node status: 3 > 2009-12-14 20:16:35 DEBUG: pid 25350: health_check: 3 th DB node status: 3 > Now, trying to recovery another node: > [postg...@im-pp2 .ssh]$ pcp_recovery_node -d 90 localhost 9898 postgres > ****** 0 > DEBUG: send: tos="R", len=46 > DEBUG: recv: tos="r", len=21, data=AuthenticationOK > DEBUG: send: tos="D", len=6 > DEBUG: recv: tos="c", len=20, data=CommandComplete > DEBUG: send: tos="X", len=4 > [postg...@im-pp2 .ssh]$ tail -f /tmp/pgpool.log -n 0 > 2009-12-14 20:18:05 DEBUG: pid 25350: starting health checking > 2009-12-14 20:18:05 DEBUG: pid 25350: health_check: 0 th DB node status: 1 > 2009-12-14 20:18:05 DEBUG: pid 25350: health_check: 1 th DB node status: 1 > 2009-12-14 20:18:05 DEBUG: pid 25350: health_check: 2 th DB node status: 3 > 2009-12-14 20:18:05 DEBUG: pid 25350: health_check: 3 th DB node status: 3 > Good, i can now add nodes again. > My question is, i noticed that node 0 and 1 have different data. Is this the > correct behaviour of pgpool? > I mean, the recovery script shouldn't take care of syncing data? Or is this > something that i have to manually do? > My current pgpool.conf is available at http://pastebin.ca/1714718. > Thanks a lot for your help, > --- > Fernando Marcelo > www.consultorpc.com > [email protected] > Em 14/12/2009, às 14:38, Marcos Davi Reis escreveu: > > Fernando, > When you say, "i started the failed node again", did you use > pcp_recovery_node to do that? > > Att, > Marcos Davi > > On Mon, Dec 14, 2009 at 1:11 PM, Fernando Morgenstern > <[email protected]> wrote: >> >> Hello, >> >> Do you have any additional suggestions of things that i should check? >> >> I am a bit lost with this problem and currently i don't know what else i can >> try ( I even tried to start only node, but it is show as status 3 ) . >> >> Best Regards, >> --- >> >> Fernando Marcelo >> www.consultorpc.com >> [email protected] >> >> Em 13/12/2009, às 06:38, Tatsuo Ishii escreveu: >> >>>> Hello, >>>> >>>> I started to use pgpool a few days ago and, while testing it, i am >>>> having some issues to bring nodes back. >>>> >>>> I have 4 nodes running, so i decided to stop one of them. I saw on >>>> logs that its status changed to 3. Ok, perfect. >>>> >>>> Them, i started the failed node again, but its status was still 3. >>> >>> This is an expected behavior. pgpool does not re-connect recovered >>> node. If pgpool does this, pgpool will repeat connect/disconnect node >>> forever if it's connected through a flakey network. >>> >>>> I decided to stop and start pgpool again, now all nodes have status 3: >>>> >>>> 2009-12-11 11:29:28 DEBUG: pid 1107: health_check: 0 th DB node >>>> status: 3 >>>> 2009-12-11 11:29:28 DEBUG: pid 1107: health_check: 1 th DB node >>>> status: 3 >>>> 2009-12-11 11:29:28 DEBUG: pid 1107: health_check: 2 th DB node >>>> status: 3 >>>> 2009-12-11 11:29:28 DEBUG: pid 1107: health_check: 3 th DB node >>>> status: 3 >>> >>> This is not what I'm expecting. Can you double check you can connect >>> to the DB nodes by: >>> >>> psql -U postgres -h your_db_host_name -p its_port_number template1: >>> >>> For example, >>> >>> psql -U postgres -h im-pp3 -p 4003 template1 >>> >>> Also can you show me the all the log after restarting pgool? >>> -- >>> Tatsuo Ishii >>> SRA OSS, Inc. Japan >> >> _______________________________________________ >> Pgpool-general mailing list >> [email protected] >> http://pgfoundry.org/mailman/listinfo/pgpool-general > > > > -- > Marcos Davi Reis > Mova > www.movaomundo.com > +55 21 3553-1511 > +55 21 9923-8319 > > > _______________________________________________ > Pgpool-general mailing list > [email protected] > http://pgfoundry.org/mailman/listinfo/pgpool-general > -- Marcos Davi Reis Mova www.movaomundo.com +55 21 3553-1511 +55 21 9923-8319 _______________________________________________ Pgpool-general mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-general
