Recovery continually requests new WAL files

From: Alex Good <alexjsgood(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Recovery continually requests new WAL files
Date: 2012-06-12 16:33:39
Message-ID: 4FD76F63.9090605@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey!

I have a simple setup with one master and one backup server. I have an
issue where I have performed a backup and copied it to the data
directory for the slave, written a recovery.conf and copied in the
backup_label file and then started the server, it happily restores
everything up until and including the WAL file mentioned in the
backup_label and then attempts to obtain the next archive file which has
not yet been archived. I can't for the life of me figure out what is
going on.

Here's a break down of what I do

call pg_start_backup('label')

tar -zcf backup.tar.gz base global pg_clog pg_multixact pg_notify
pg_serial pg_subtrans pg_tblspc pg_twophase backup_label

call pg_stop_backup()

scp pgsql.tar.gz slave_hostname:/var/lib/postgresql/9.1/main

move to slave server

rm -rf global base pg_clog pg_multixact pg_notify pg_serial pg_subtrans
pg_tblspc pg_twophase pg_xlog/*
mkdir pg_xlog/archive_status
tar -xvf backup.tar.gz

restart postgresql

----------------
recovery.conf
-----------------
restore_command = 'scp
master-hostname:/var/lib/postgresql/9.1/main/wal_archives/%f %p'
standby_mode=on

And here's what I'm seeing in the logs on the recovering server

2012-06-12 16:31:26 UTC FATAL: the database system is starting up
2012-06-12 16:31:27 UTC FATAL: the database system is starting up
2012-06-12 16:31:27 UTC FATAL: the database system is starting up
2012-06-12 16:31:27 UTC LOG: incomplete startup packet
2012-06-12 16:31:30 UTC LOG: restored log file
"00000001000000000000000A" from archive
2012-06-12 16:31:30 UTC LOG: redo starts at 0/A000078
2012-06-12 16:31:30 UTC LOG: consistent recovery state reached at 0/B000000
scp: /var/lib/postgresql/9.1/main/wal_archives/00000001000000000000000B:
No such file or directory
scp: /var/lib/postgresql/9.1/main/wal_archives/00000001000000000000000B:
No such file or directory
scp: /var/lib/postgresql/9.1/main/wal_archives/00000001000000000000000B:
No such file or directory

I'm confused by this because the 00000001000000000000000B archive wasn't
created until after the pg_stop_backup call so why is it needed?

Any help would be appreciated, I've been banging my head against this
one for a while.

Thanks
Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message leaf_yxj 2012-06-12 16:53:44 How to create c language in postgresql database. Thanks.
Previous Message Tom Lane 2012-06-12 14:18:11 Re: import *.backup-file (PostGIS - not mine)