Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 712E6133655C for ; Mon, 3 Jan 2011 14:37:15 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 70059-05 for ; Mon, 3 Jan 2011 18:37:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1a.aso.ee (smtp1a.aso.ee [213.184.32.86]) by mail.postgresql.org (Postfix) with ESMTP id A980313364DE for ; Mon, 3 Jan 2011 14:37:06 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1a.aso.ee (Postfix) with ESMTP id 23F8B4D8E9; Mon, 3 Jan 2011 20:37:05 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at smtp1a.avalik.kit Received: from smtp1a.aso.ee ([127.0.0.1]) by localhost (smtp1a.avalik.kit [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id exIYdeaS56cb; Mon, 3 Jan 2011 20:37:05 +0200 (EET) Received: from [172.19.10.50] (unknown [172.19.10.50]) by smtp1a.aso.ee (Postfix) with ESMTP id EDF3C4D8E2; Mon, 3 Jan 2011 20:37:04 +0200 (EET) Message-ID: <4D221750.1010605@auul.pri.ee> Date: Mon, 03 Jan 2011 20:37:04 +0200 From: Imre Oolberg User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101226 Icedove/3.0.11 MIME-Version: 1.0 To: Kevin Grittner CC: pgsql-admin@postgresql.org Subject: Re: pg v. 8.4.5 misses objects and data after restoring from backup using wal References: <4D1C670E.1090408@auul.pri.ee> <4D21AC15.1010102@auul.pri.ee> <4D21B4AE0200002500038F48@gw.wicourts.gov> In-Reply-To: <4D21B4AE0200002500038F48@gw.wicourts.gov> Content-Type: multipart/alternative; boundary="------------030801030009000906010504" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201101/14 X-Sequence-Number: 36454 This is a multi-part message in MIME format. --------------030801030009000906010504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 01/03/11 19:36, Kevin Grittner wrote: > Imre Oolberg wrote: > > >> archive_command = 'test ! -f >> /data/backup/postgresql/archive-logs/%f&& >> cp %p /data/backup/postgresql/archive-logs' >> > > I suppose that will work, but why not specify %f in the copy target? > > Yep, that works as it is since wal files are created althought to use %f should not hurt either. >> I guess that my problem is probably that although my .backup file >> says >> >> 000000010000000000000009.00000020.backup >> START WAL LOCATION: 0/9000020 (file 000000010000000000000009) >> STOP WAL LOCATION: 1/6325B2E0 (file 000000010000000100000063) >> CHECKPOINT LOCATION: 0/A2C4908 >> START TIME: 2011-01-03 11:32:17 EET >> LABEL: test >> STOP TIME: 2011-01-03 12:18:27 EET >> >> looking at the pg_ctl.log it starts reading wal logs beginning >> with 000000010000000100000063 and not with >> 000000010000000000000009 >> > > What did you have in your recovery.conf file? > I have there exactly one line restore_command = 'cp /data/backup/postgresql/archive-logs/%f %p' and with it i expect to restore as much data as i have wal files archived. The most strange thing is that it uses archived wal files which are generated after pg_stop_backup but skips all others. Imre > > -Kevin > --------------030801030009000906010504 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 01/03/11 19:36, Kevin Grittner wrote:
Imre Oolberg <imre@auul.pri.ee> wrote:
 
  
archive_command = 'test ! -f
/data/backup/postgresql/archive-logs/%f && 
cp %p /data/backup/postgresql/archive-logs'
    
 
I suppose that will work, but why not specify %f in the copy target?
 
  
Yep, that works as it is since wal files are created althought to use %f should not hurt either.
I guess that my problem is probably that although my .backup file
says

000000010000000000000009.00000020.backup
START WAL LOCATION: 0/9000020 (file 000000010000000000000009)
STOP WAL LOCATION: 1/6325B2E0 (file 000000010000000100000063)
CHECKPOINT LOCATION: 0/A2C4908
START TIME: 2011-01-03 11:32:17 EET
LABEL: test
STOP TIME: 2011-01-03 12:18:27 EET

looking at the pg_ctl.log it starts reading wal logs beginning
with 000000010000000100000063 and not with
000000010000000000000009
    
 
What did you have in your recovery.conf file?
  

I have there exactly one line

restore_command = 'cp /data/backup/postgresql/archive-logs/%f %p'

and with it i expect to restore as much data as i have wal files archived. The most strange thing is that it uses archived wal files which are generated after pg_stop_backup but skips all others.


Imre

 
-Kevin
  

--------------030801030009000906010504--