Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 8CC3E634249 for ; Thu, 11 Feb 2010 19:39:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 60523-04 for ; Thu, 11 Feb 2010 23:39:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id D785963346B for ; Thu, 11 Feb 2010 19:39:34 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 635A434803A; Thu, 11 Feb 2010 15:39:33 -0800 (PST) Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9zYYcozHnLPo; Thu, 11 Feb 2010 15:39:33 -0800 (PST) Received: from perhan.alvh.no-ip.org (190-95-31-230.bk17-dsl.surnet.cl [190.95.31.230]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id E4B3F348034; Thu, 11 Feb 2010 15:39:32 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 5BE9D6E4C2; Thu, 11 Feb 2010 20:39:30 -0300 (CLST) Date: Thu, 11 Feb 2010 20:39:30 -0300 From: Alvaro Herrera To: Albert Shih Cc: Kevin Grittner , pgsql-admin@postgresql.org Subject: Re: How to manage WAL Message-ID: <20100211233930.GL3145@alvh.no-ip.org> References: <20100211223245.GA13434@obspm.fr> <4B7437B1020000250002F1FD@gw.wicourts.gov> <20100211233225.GA55871@obspm.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100211233225.GA55871@obspm.fr> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.551 tagged_above=-10 required=5 tests=AWL=0.048, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/104 X-Sequence-Number: 33707 Albert Shih wrote: > Le 11/02/2010 à 17:00:33-0600, Kevin Grittner a écrit > > Albert Shih wrote: > > > > > I would like to known what's best way to manage the WAL. > > > > You should design a policy which meets your particular needs. We > > keep two PITR base backups and all the WAL files from before the > > start of the first (based on the information in the backup file) > > through current. We also save monthly archival PITR base backups > > with just the WAL files needed to restore them (again, based on the > > backup files). Your needs may be different. > > Hum...I'm not sure I really understand what you doing. > > Maybe I'm doing everything wrong but this is what I did : > > t=0 SELECT pg_start_backup('label'); > rsync /pgsql backup_server:/ > SELECT pg_stop_backup(); > > t> 1 cron with rsync /WAL backup_server: > > but after some time the /WAL become big. So is it a solution to > stop the database, delete everything in /WAL and begin a new cycle (t=0 select etc...) ? You could do that if you wanted, but there's a window during which you have no backup at all. Perhaps it's better to take a second base backup, start archiving to a different directory /WAL2, and when the second base backup is done you can delete /WAL -- Alvaro Herrera http://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc.