[Pgpool-general] Not able to recover a node using pgpool recovery

DM dm.aeqa at gmail.com
Sat Mar 14 02:49:13 UTC 2009


Also here is teh base-backup script.

########################## base-backup.sh##########################
#!/bin/sh
# PGDATA path for master node

DATA=$1

# Recovery host name
RECOVERY_TARGET=$2

# PGDATA path for recovery node
RECOVERY_DATA=$3

# ok, this needs to be issued on some running backend, so I
# personally use pcp_node_count and pcp_node_info to get the
# ip address of a master (script follows, as soon as the
# cluster is running well

/usr/postgres/8.3.6/bin/psql -p 9999 -c "select
pg_start_backup('pgpool-recovery')" postgres

# I would favor /tmp/pgpool-recovery instead of /data,
# as it contains live data

echo "restore_command = 'scp
$HOSTNAME:/mnt/data/pns/pgsql8.3.6/archive_log/%f %p'" >
/mnt/data/pns/pgsql8.3.6/recovery.conf

# I guess pgsql is the datadir I've with /var/lib/postgresql/8.3/main
# under debian?

tar -zcf /mnt/data/pns/pgsql8.3.6.tar.gz /mnt/data/pns/pgsql8.3.6/

/usr/postgres/8.3.6/bin/psql -p 9999 -c 'select pg_stop_backup()' postgres

scp /mnt/data/pns/pgsql8.3.6.tar.gz
$RECOVERY_TARGET:/mnt/data/pns/pgsql8.3.6/

##########################end of Script##########################

Should I need to set these environment variables -RECOVERY_TARGET,
RECOVERY_DATA ?


On Fri, Mar 13, 2009 at 7:04 PM, DM <dm.aeqa at gmail.com> wrote:

> Hi All,
>
> Not able to recover node using pgpool recovery
>
> # I did all the configuration changes - Gerd Koenig's document
>
> pcp_recovery_node -d 10.80.16.16 9898 pgpuser xyz 1
>
> 2009-03-13 18:07:26 LOG:   pid 17559: starting recovering node 1
> 2009-03-13 18:07:26 LOG:   pid 17559: CHECKPOINT in the 1st stage done
> 2009-03-13 18:07:26 LOG:   pid 17559: starting recovery command: "SELECT
> pgpool_recovery('base-backup', 'fdbr-res0002', '/mnt/data/pns/pgsql8.3.6')"
>  2009-03-13 18:07:26 ERROR: pid 17559: exec_recovery: base-backup command
> failed at 1st stage
> 2009-03-13 18:10:01 LOG:   pid 17559: starting recovering node 1
>
>
> #####################################################
>
> I logged to psql on fdbr-res0001
>
> #===========
> [postgres at fdbr-res0001 scripts]$ /usr/postgres/8.3.6/bin/psql -p9999
> Welcome to psql 8.3.6, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>        \h for help with SQL commands
>        \? for help with psql commands
>        \g or terminate with semicolon to execute query
>        \q to quit
>
> postgres=# \c template1
> You are now connected to database "template1".
> template1=# SELECT pgpool_recovery('base-backup', 'fdbr-res0002',
> '/mnt/data/pns/pgsql8.3.6');
> ERROR:  pgpool_recovery failed
> template1=#
> #===========
>
> Not able to figure out how to solve this issue
> ERROR:  pgpool_recovery failed
>
> Help me with this error
>
> Thanks
> Deepak Murthy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgpool-general/attachments/20090313/40c37817/attachment.html 


More information about the Pgpool-general mailing list