From msteben@autorevenue.com Fri May 16 15:42:09 2008 Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D99A12E0031 for ; Fri, 16 May 2008 12:42:09 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 08501-01 for ; Fri, 16 May 2008 12:41:28 -0300 (ADT) X-Greylist: delayed 00:06:28.589027 by SQLgrey-1.7.6 Received: from mail.autorevenue.com (ip-208.178.167.106.gblx.net [208.178.167.106]) by developer.postgresql.org (Postfix) with ESMTP id 34EE42E003F for ; Fri, 16 May 2008 12:41:16 -0300 (ADT) Received: (qmail 18722 invoked from network); 16 May 2008 11:34:52 -0400 Received: from unknown (HELO dei26g028575) (msteben@10.10.1.20) by mail.autorevenue.com with SMTP; 16 May 2008 11:34:52 -0400 From: "Mark Steben" To: Subject: error message in PITR restore: Date: Fri, 16 May 2008 11:35:03 -0400 Message-ID: <006b01c8b76a$690c0170$14010a0a@dei26g028575> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_006C_01C8B748.E1FF1C60" X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992 Thread-Index: Aci3amjJnP28ctAHQPayaUprNxWdxw== X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/145 X-Sequence-Number: 29229 This is a multi-part message in MIME format. ------=_NextPart_000_006C_01C8B748.E1FF1C60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi folks, I'm in the process of implementing PITR backups and restores and learning as I practice. I restored Using tar -xzf (backup-name) followed by restarting postgres and having the server replay the logs. I used a recovery_target_time of 1 day prior to current_date Postgres seems to come up OK but I get the following message over and over again in the serverlog: ERROR: xlog flush request F/83462374 is not satisfied --- flushed only to F/82FFF0AC CONTEXT: writing block 1242336 of relation 1663/16388/17696 The logs that came into play in the replay are (in shorthand) 80, 81, 82. The log that was copied back into xlog was 83 prior to the restore. The relation in the error message points back to a table that was indeed being updated While the backup was being done. When I attempt to do another backup I get an error that the checkpoint request failed. Is there any way replay the restore to get out of this pickle, or do I start from scratch? Fortunately this is a development server so I have the luxury of recopying production. Mark Steben Senior Database Administrator @utoRevenueT A Dominion Enterprises Company 480 Pleasant Street Suite B200 Lee, MA 01238 413-243-4800 Home Office 413-243-4809 Corporate Fax msteben @autorevenue.com Visit our new website at www.autorevenue.com IMPORTANT: The information contained in this e-mail message is confidential and is intended only for the named addressee(s). If the reader of this e-mail message is not the intended recipient (or the individual responsible for the delivery of this e-mail message to the intended recipient), please be advised that any re-use, dissemination, distribution or copying of this e-mail message is prohibited. If you have received this e-mail message in error, please reply to the sender that you have received this e-mail message in error and then delete it. Thank you. ------=_NextPart_000_006C_01C8B748.E1FF1C60 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi folks,

  I’m in the process of implementing PITR backups and restores and learning as I practice. I = restored

 Using tar –xzf  (backup-name) followed by = restarting postgres and having the server replay the = logs.

  I used a recovery_target_time of 1 day prior to current_date  Postgres seems to come up OK = but

  I get the following message over and over again in the serverlog:

 

      ERROR:  xlog flush request F/83462374 is not satisfied --- flushed only to = F/82FFF0AC

     CONTEXT:  writing block 1242336 of relation 1663/16388/17696

 

  The logs that came into play in the replay are (in = shorthand)

       80, 81, 82.   The = log that was copied back into xlog was 83 prior to the = restore.

 The relation in the error message points back to a table = that was indeed being updated

 While the backup was being = done.

 

When I attempt to do another backup I get an error that the = checkpoint request failed.

 

Is there any way replay the restore to get out of this pickle, = or do I start from scratch?

 

Fortunately this is a development server so I have the luxury of recopying production.

 

 

Mark Steben

Senior Database Administrator
@utoRevenue™
A Dominion = Enterprises Company
480 = Pleasant Street
Suite = B200
Lee, MA 01238
413-243-4800 Home Office 
413-243-4809 Corporate Fax

msteben@autorevenue.com

Visit our = new website at
www.autorevenue.com

 

IMPORTANT: The information = contained in this e-mail message is confidential and is intended only for the named addressee(s). If the reader of this e-mail message is not the intended recipient (or the individual responsible for the delivery of this e-mail message to the intended recipient), please be advised that any re-use, dissemination, distribution or copying of this e-mail message is = prohibited.  If you have received this e-mail message in error, please reply to = the sender that you have received this e-mail message in error and then = delete it.  Thank you.

 

------=_NextPart_000_006C_01C8B748.E1FF1C60-- From simon@2ndquadrant.com Fri May 16 16:30:04 2008 Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 8311F2E002F for ; Fri, 16 May 2008 13:30:04 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 35328-03 for ; Fri, 16 May 2008 13:29:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail136189.authsmtp.net (outmail136189.authsmtp.net [62.13.136.189]) by developer.postgresql.org (Postfix) with ESMTP id 111A82E002D for ; Fri, 16 May 2008 13:28:55 -0300 (ADT) Received: from mail.authsmtp.com (mail.authsmtp.com [62.13.128.187]) by punt6.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4GGSfYf075535; Fri, 16 May 2008 17:28:41 +0100 (BST) Received: from [192.168.0.6] (85-211-226-243.dyn.gotadsl.co.uk [85.211.226.243]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4GGSeih029860; Fri, 16 May 2008 17:28:40 +0100 (BST) Subject: Re: error message in PITR restore: From: Simon Riggs To: Mark Steben Cc: pgsql-admin@postgresql.org In-Reply-To: <006b01c8b76a$690c0170$14010a0a@dei26g028575> References: <006b01c8b76a$690c0170$14010a0a@dei26g028575> Content-Type: text/plain; charset=utf-8 Date: Fri, 16 May 2008 17:30:21 +0100 Message-Id: <1210955421.18922.63.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 8bit X-Server-Quench: 24cb9b61-2365-11dd-8782-001185d377ca X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQNbYFhI HGQLW1xEUVp7W2t/ bwofZQBDYEtPQQdo VlZLRlFNFgB3AVJc AmlpMUwrLwVEcXZ2 ZQhjX3lTEkZ+JhR0 EEhVCG8FY2J9aWFL BF1QcAtWbQNKfx5N bwR8U3ReMCtlM3Bw LCYfGhEXCH1SMj5S WEkIIEkJSEkGVj86 DygjIQ9nB0AeWyIp Ik5O X-Authentic-SMTP: 61633235383639.squirrel.dmpriest.net.uk:953/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/146 X-Sequence-Number: 29230 On Fri, 2008-05-16 at 11:35 -0400, Mark Steben wrote: > I’m in the process of implementing PITR backups and restores and > learning as I practice. I restored > > Using tar –xzf (backup-name) followed by restarting postgres and > having the server replay the logs. > > I used a recovery_target_time of 1 day prior to current_date > Postgres seems to come up OK but > Did you use pg_start_backup()? That sequence of events can occur if the backup_label file is missing, since that won't constrain the stop point from being earlier than it should be. Is there a backup_label file as part of the tar? -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support From msteben@autorevenue.com Fri May 16 17:21:06 2008 Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 69C4D2E0049 for ; Fri, 16 May 2008 14:21:06 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66094-06 for ; Fri, 16 May 2008 14:20:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.autorevenue.com (ip-208.178.167.106.gblx.net [208.178.167.106]) by developer.postgresql.org (Postfix) with ESMTP id B15E62E002F for ; Fri, 16 May 2008 14:20:58 -0300 (ADT) Received: (qmail 16205 invoked from network); 16 May 2008 13:21:13 -0400 Received: from unknown (HELO dei26g028575) (msteben@10.10.1.20) by mail.autorevenue.com with SMTP; 16 May 2008 13:21:13 -0400 From: "Mark Steben" To: "'Simon Riggs'" Cc: Subject: Re: error message in PITR restore: Date: Fri, 16 May 2008 13:21:26 -0400 Message-ID: <007701c8b779$45c2a890$14010a0a@dei26g028575> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <1210955421.18922.63.camel@ebony.site> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2992 Thread-Index: Aci3cfgATQ+W6e5MRqyb6UHpQfZhEQABcgSQ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/151 X-Sequence-Number: 29235 Mark Steben Senior Database Administrator @utoRevenueT A Dominion Enterprises Company 480 Pleasant Street Suite B200 Lee, MA 01238 413-243-4800 Home Office 413-243-4809 Corporate Fax msteben@autorevenue.com Visit our new website at www.autorevenue.com IMPORTANT: The information contained in this e-mail message is confidential and is intended only for the named addressee(s). If the reader of this e-mail message is not the intended recipient (or the individual responsible for the delivery of this e-mail message to the intended recipient), please be advised that any re-use, dissemination, distribution or copying of this e-mail message is prohibited. If you have received this e-mail message in error, please reply to the sender that you have received this e-mail message in error and then delete it. Thank you. -----Original Message----- From: Simon Riggs [mailto:simon@2ndquadrant.com] Sent: Friday, May 16, 2008 12:30 PM To: Mark Steben Cc: pgsql-admin@postgresql.org Subject: Re: [ADMIN] error message in PITR restore: On Fri, 2008-05-16 at 11:35 -0400, Mark Steben wrote: > I'm in the process of implementing PITR backups and restores and > learning as I practice. I restored > > Using tar -xzf (backup-name) followed by restarting postgres and > having the server replay the logs. > > I used a recovery_target_time of 1 day prior to current_date > Postgres seems to come up OK but > Did you use pg_start_backup()? That sequence of events can occur if the backup_label file is missing, since that won't constrain the stop point from being earlier than it should be. Is there a backup_label file as part of the tar? [Mark Steben] -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support [Mark Steben] You may have hit on the issue. I started a tar, then realized that I did not do a 'start backup' so I cancelled the tar then issued the 'start_backup' and 'restarted' the tar. Now when I issue another start-backup I get the 'checkpoint request failed' error. There is a 'backup_label_old' file as part of the data cluster but not A backup_label. Simon, I think you uncovered the problem but I don't see anyway around it Short of reloading the db from a pg_dump backup. Any suggestions would Be appreciated. Thanks, Mark From simon@2ndquadrant.com Fri May 16 17:34:49 2008 Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id D2E912E0031 for ; Fri, 16 May 2008 14:34:49 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73876-05 for ; Fri, 16 May 2008 14:34:45 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail128073.authsmtp.com (outmail128073.authsmtp.com [62.13.128.73]) by developer.postgresql.org (Postfix) with ESMTP id 3FFA72E002F for ; Fri, 16 May 2008 14:34:46 -0300 (ADT) Received: from mail-c188.authsmtp.com (mail-c188.authsmtp.com [62.13.128.25]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4GHYgtG093392; Fri, 16 May 2008 18:34:42 +0100 (BST) Received: from [192.168.0.6] (85-211-226-243.dyn.gotadsl.co.uk [85.211.226.243]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m4GHYf2Q029723; Fri, 16 May 2008 18:34:41 +0100 (BST) Subject: Re: error message in PITR restore: From: Simon Riggs To: Mark Steben Cc: pgsql-admin@postgresql.org In-Reply-To: <007701c8b779$45c2a890$14010a0a@dei26g028575> References: <007701c8b779$45c2a890$14010a0a@dei26g028575> Content-Type: text/plain Date: Fri, 16 May 2008 18:36:22 +0100 Message-Id: <1210959382.18922.99.camel@ebony.site> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit X-Server-Quench: 5db4b17f-236e-11dd-aecc-001871e930f4 X-AuthRoute: OCdxZQATClZOTQEd DAteCiNZVAwpPBRK HVkIKg5MJUcNSQVJ NksadBtFaQNbYFhI HGQLW1xEUVV7Wmd/ bwsfZQBDYEtPQQdo VlZLRlFNFgB3AVJc AmlmO09wFgVEcXly ZghqXXYVWRAocRR8 RRhJF24AMHphaTRL TRENJFBJcANLdhhE P1l8VCUJLwdybGoL NiMWHhYEdThFMiNP CgQANkkbTktDHzh0 fzE+J301EFYZQD8+ fXQn X-Authentic-SMTP: 61633235383639.cat.dmpriest.net.uk:953/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/152 X-Sequence-Number: 29236 On Fri, 2008-05-16 at 13:21 -0400, Mark Steben wrote: > Simon, I think you uncovered the problem but I don't see anyway around > it Short of reloading the db from a pg_dump backup. Any suggestions > would Be appreciated. Thanks, Re-run the backup? Sounds safest. -- Simon Riggs www.2ndQuadrant.com PostgreSQL Training, Services and Support