[Pgpool-general] Cannot add node after failure

Fernando Morgenstern fernando at consultorpc.com
Mon Dec 14 19:31:39 UTC 2009


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:

[postgres at im-pp2 .ssh]$ pgpool -n -d > /tmp/pgpool.log 2>&1 &
[1] 25350

Attach node 1:

[postgres at 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:

[postgres at 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:

[postgres at 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

[postgres at 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
fernando at consultorpc.com

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 <fernando at consultorpc.com 
> > 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
> fernando at consultorpc.com
>
> 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
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general
>
>
>
> -- 
> Marcos Davi Reis
> Mova
> www.movaomundo.com
> +55 21 3553-1511
> +55 21 9923-8319

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://pgfoundry.org/pipermail/pgpool-general/attachments/20091214/4e1b7313/attachment.html>


More information about the Pgpool-general mailing list