[pgpool-general: 2483] Re: Help error code e1012 on pgpool II 3.3.0 while clicking Recovery button
Syed Irfan
syedirfan_77 at yahoo.com
Fri Jan 24 13:30:46 JST 2014
This is what the recovery.conf looks like.
*******************************************
#recovery_target_timeline = 'latest'
standby_mode = 'on'
primary_conninfo = 'host=postgres-p.rolta.com port=5432 user=postgres'
trigger_file = '/var/log/pgpool/trigger/trigger_file1'
********************************************************
The basebackup.sh on both postgres databases is as follows
**************************************************
#/bin/sh -x
#
# XXX We assume master and recovery host uses the same port number
PORT=5432
master_node_host_name=`hostname`
master_db_cluster=$1
recovery_node_host_name=$2
recovery_db_cluster=$3
tmp=/tmp/mytemp$$
trap "rm -f $tmp" 0 1 2 3 15
psql -p $PORT -c "SELECT pg_start_backup('Streaming Replication', true)" postgres
rsync -C -a -c --delete --exclude postgresql.conf --exclude postmaster.pid \
--exclude postmaster.opts --exclude pg_log \
--exclude recovery.conf --exclude recovery.done \
--exclude pg_xlog \
$master_db_cluster/ $recovery_node_host_name:$recovery_db_cluster
ssh -T $recovery_node_host_name mkdir $recovery_db_cluster/pg_xlog
ssh -T $recovery_node_host_name chmod 700 $recovery_db_cluster/pg_xlog
ssh -T $recovery_node_host_name rm -f $recovery_db_cluster/recovery.done
cat > $tmp <<EOF
#recovery_target_timeline = 'latest'
standby_mode = 'on'
primary_conninfo = 'host=$master_node_host_name port=$PORT user=postgres'
trigger_file = '/var/log/pgpool/trigger/trigger_file1'
EOF
scp $tmp $recovery_node_host_name:$recovery_db_cluster/recovery.conf
psql -p $PORT -c "SELECT pg_stop_backup()" postgres
***********************************************
Thanks and Regards,
Syed Irfan.
Sr. Developer
On Thursday, 23 January 2014 11:07 PM, Jeff Frost <jeff at pgexperts.com> wrote:
On Jan 23, 2014, at 9:32 AM, Syed Irfan <syedirfan_77 at yahoo.com> wrote:
Dear Tatsuo Ishii,
>
>
> I am still awaiting for your reply on this issue, I have tried your suggestions but still I am unable to successfully run the Recovery process the third time it's surprises me how does it work the first time but same thing fails in the third attempt.?
>
>
>The Postgres log shows as below
>
>
>
>
>>> 28038 2014-01-09 21:28:33 BDT FATAL: timeline 35 of the primary does not match recovery target timeline 36
>>>> 28039 2014-01-09 21:28:38 BDT FATAL: timeline 35 of the primary does not match recovery target timeline 36
>
>
>
>I urgently request you to help me in this impending issue.
>
This is usually caused by postgres trying to replay WAL files from the wrong source. Did you clean out the pg_xlog directory on the replica before taking the base backup?
What does your recovery.conf look like?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20140124/8fe4ca44/attachment.htm>
More information about the pgpool-general
mailing list