Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id D549F63275D for ; Sat, 5 Jun 2010 02:21:34 -0300 (ADT) 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 65708-04 for ; Sat, 5 Jun 2010 05:21:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from rs47.luxsci.com (rs47.luxsci.com [65.61.166.88]) by mail.postgresql.org (Postfix) with ESMTP id 9A4216323D1 for ; Sat, 5 Jun 2010 02:21:27 -0300 (ADT) Received: from gnanam (ABTS-TN-Static-186.58.165.122.airtelbroadband.in [122.165.58.186] (may be forged)) (authenticated bits=0) by rs47.luxsci.com (8.13.1/8.13.7) with ESMTP id o555LGBk024859; Sat, 5 Jun 2010 00:21:18 -0500 Reply-To: From: "Gnanakumar" To: "'Kevin Grittner'" , Cc: References: <001201cb0321$df429d40$9dc7d7c0$@com> <00ca01cb03dc$a9ffe780$fdffb680$@com> <4C08CF4D0200002500031F44@gw.wicourts.gov> In-Reply-To: <4C08CF4D0200002500031F44@gw.wicourts.gov> Subject: Re: PITR Recovery Question Date: Sat, 5 Jun 2010 10:51:16 +0530 Organization: Zoniac Software Private Limited Message-ID: <00cb01cb046e$ee54f550$cafedff0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcsD9wQNdd6/4aG5Q7SfFEvixvuniwAdWtyQ Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.1 tagged_above=-10 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201006/53 X-Sequence-Number: 34831 Hi Kevin, > It is generally unsafe to delete any WAL files from pg_xlog. If > they are there because your archive command has been failing, you > need to turn off archiving or (probably more convenient) allow the > archive script to return success until things clear. One trick > would be to temporarily change your archive_command to 'true', > delete all files from your archive, and then change the command > back. Doing that without exposing yourself to a period where you > have no backup might be tricky, though. I'm trying to see and understand your view point, but I couldn't able to get this particular step clearly: "One trick would be to temporarily change your archive_command to 'true', delete all files from your archive, and then change the command back ". Can you please clarify and explain on this? When you say *temporarily changing archive_command to 'true' *, do you mean enabling/disabling of WAL archiving here? Per documentation, "If this is an empty string (the default), WAL archiving is disabled.". And when you say "change the command back", I understood it as *disabling*. Is my understanding correct? > If the only problem with the archive command is that the archive fs > is full, I would copy the contents of the archive directory to tape > or whatever medium you have for long-term storage, delete the > contents, and let archive succeed. The pg_xlog directory will > eventually clear, and then I would get a fresh PITR base backup > (following all the documented steps for doing so). You really want > to see WAL files flowing to your archive location before you start > the process of getting a new base backup. Yes, probably I should go ahead and proceed as you suggested above, that is allowing archive script to run successfully until things are completely clear. > If there's some other reason that the archive command has been > failing, what is it? No other reason. It was failing only because my WAL archive drive was full. Regards, Gnanam