[pgpool-general: 924] Re: recovery command failed but SELECT pgpool_recovery(...) works

Soni Maula Harriz soni.harriz at sangkuriang.co.id
Tue Aug 28 14:16:59 JST 2012


what recovery method do you use ? PITR or rsync ? I use PITR method from
Gerd's tutorial (
http://www.pgpool.net/pgpool-web/contrib_docs/pgpool-II_for_beginners.pdf),
everything goes well for the recovery.

On Tue, Aug 28, 2012 at 12:02 PM, Kent Tong <kent.tong.mo at gmail.com> wrote:

> The basebackup.sh is very simple: just print something to a log:
>
> #! /bin/sh
> datadir=$1
> desthost=$2
> destdir=$3
>
> echo "recovering: " $desthost >> /tmp/f1.log
> echo $* >> /tmp/f1.log
> exit 0
>
> On Tue, Aug 28, 2012 at 12:57 PM, Soni Maula Harriz <
> soni.harriz at sangkuriang.co.id> wrote:
>
>> you can test each command reside in basebackup.sh via terminal using user
>> postgres, so you can tell which command failed
>>
>> On Tue, Aug 28, 2012 at 11:49 AM, Kent Tong <kent.tong.mo at gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I am using 3.1.3 and working on the online recovery. After issuing the
>>> "pcp_recovery_node -d 10 localhost 9898 postgres postgres 0" command to try
>>> to recover backend 0, it fails:
>>>
>>> EBUG: send: tos="R", len=46
>>> DEBUG: recv: tos="r", len=21, data=AuthenticationOK
>>> DEBUG: send: tos="D", len=6
>>> DEBUG: recv: tos="e", len=20, data=recovery failed
>>> DEBUG: command failed. reason=recovery failed
>>> BackendError
>>> DEBUG: send: tos="X", len=4
>>>
>>> The following messages are found in the log. It means that pgpool
>>> connected the to backend 0 successfully but the SELECT failed:
>>>
>>> Aug 28 12:32:44 pgpool02 pgpool[3791]: starting recovering node 0
>>>
>>> Aug 28 12:32:44 pgpool02 pgpool[3791]: starting recovery command:
>>> "SELECT pgpool_recovery('basebackup.sh', 'masterdb',
>>> '/var/lib/pgsql/9.1/data')"
>>> Aug 28 12:32:44 pgpool02 pgpool[3791]: exec_recovery: basebackup.sh
>>> command failed at 1st stage
>>>
>>> However, I can use psql to execute that SELECT query on the pgpool
>>> machine successfully:
>>>
>>> [root at pgpool02 pgpool-II-91]# psql -h masterdb -c "SELECT
>>> pgpool_recovery('basebackup.sh', 'masterdb', '/var/lib/pgsql/9.1/data')"
>>> template1 postgres
>>> Password for user postgres:
>>>
>>>  pgpool_recovery
>>>
>>> -----------------
>>>
>>>  t
>>>
>>> (1 row)
>>>
>>> The recovery_user and recovery_password have been set to "postgres" and
>>> its password.
>>>
>>> So, any idea why it failed?
>>>
>>> --
>>> Kent Tong
>>> IT author and consultant, child educator
>>>
>>>
>>> _______________________________________________
>>> pgpool-general mailing list
>>> pgpool-general at pgpool.net
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>>
>>>
>>
>>
>> --
>> Best Regards,
>>
>> Soni Maula Harriz
>> Database Administrator
>> PT. Data Aksara Sangkuriang
>>
>>
>
>
> --
> Kent Tong
> IT author and consultant, child educator
>
>


-- 
Best Regards,

Soni Maula Harriz
Database Administrator
PT. Data Aksara Sangkuriang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120828/6916d89c/attachment-0001.html>


More information about the pgpool-general mailing list