[Pgpool-general] Cannot add node after failure

Fernando Morgenstern fernando at consultorpc.com
Tue Dec 15 15:20:09 UTC 2009


Hello Marcos,

I am trying to follow pgpool manual at http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html#online-recovery 
  for online recovery. The article that you suggested is excellent,  
but it has a lot of different confs that what i did here, so i am  
trying to make things simplier.

While reading pgpool manual i found this:

Note that there is a restriction about online recovery. If pgpool-II  
works on multiple hosts, online recovery does not work correctly,  
because pgpool-II stops clients on the 2nd stage of online recovery.  
If there are some pgpool hosts, pgpool-II excepted for receiving  
online recovery request cannot block connections.

I am planning to run pgpool at least on two servers with heartbeat.  
Does it means that online recovery won't work in this case?

About online recovery ( based on pgpool manual ) what would be the  
correct archive_command for postgresql.conf? I couldn't find this info  
on pgpool manual.

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
fernando at consultorpc.com

Em 14/12/2009, às 18:16, Marcos Davi Reis escreveu:

> 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
> <fernando at consultorpc.com> 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:
>> [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
>>
>>
>> _______________________________________________
>> 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/20091215/dce72883/attachment-0001.html>


More information about the Pgpool-general mailing list