Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BCC0C1337B53 for ; Fri, 28 Jan 2011 12:02:17 -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 08036-10 for ; Fri, 28 Jan 2011 16:02:10 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id D80ED1337B5C for ; Fri, 28 Jan 2011 12:02:09 -0400 (AST) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Fri, 28 Jan 2011 10:02:08 -0600 Message-Id: <4D4294170200002500039F5A@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Fri, 28 Jan 2011 10:01:59 -0600 From: "Kevin Grittner" To: "Dimitri Fontaine" Cc: "Colin Wilson" , "pgsql-admin@postgresql.org" Subject: Re: Warm Standby looking for already applied log files References: <4D3D5C520200002500039B11@gw.wicourts.gov><4D3D5C520200002500039B11@gw.wicourts.gov> (Kevin Grittner's message of "Mon, 24 Jan 2011 11:02:42 -0600") In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/186 X-Sequence-Number: 36626 Dimitri Fontaine wrote: > "Kevin Grittner" writes: >> that script to not delete. Personally, I like to keep the last >> two base backups and all the WAL files needed to restore from the >> earlier of those forward. We have cleanup script that deletes >> the oldest backup and WAL files only needed for recovery from it >> when we receive a new one. > > PostgreSQL 9.0 now ships with such a script per default: > > http://www.postgresql.org/docs/9.0/interactive/pgarchivecleanup.html Thanks for pointing that out. Next time we touch the scripts, I'll see about using this instead of the bash script we call to do the equivalent. I don't suppose there's something which looks *into* a backup file and deletes all WAL files not needed to restore the related base backup? That would eliminate an even *uglier* bash script here. -Kevin