Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3D3A3633905 for ; Fri, 12 Feb 2010 07:43:46 -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 09279-01-6 for ; Fri, 12 Feb 2010 11:43:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-int-m.obspm.fr (smtp-int-m.obspm.fr [145.238.187.15]) by mail.postgresql.org (Postfix) with ESMTP id C7B4C632A6D for ; Fri, 12 Feb 2010 07:42:23 -0400 (AST) Received: from obspm.fr (pcjas.obspm.fr [145.238.184.233]) by smtp-int-m.obspm.fr (8.14.3/8.14.3/SIO Observatoire de Paris - 07/2009) with ESMTP id o1CBg46v002964 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 12 Feb 2010 12:42:05 +0100 Date: Fri, 12 Feb 2010 12:42:04 +0100 From: Albert Shih To: Alvaro Herrera Cc: Kevin Grittner , pgsql-admin@postgresql.org Subject: Re: How to manage WAL Message-ID: <20100212114204.GA92765@obspm.fr> References: <20100211223245.GA13434@obspm.fr> <4B7437B1020000250002F1FD@gw.wicourts.gov> <20100211233225.GA55871@obspm.fr> <20100211233930.GL3145@alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20100211233930.GL3145@alvh.no-ip.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Miltered: at smtp-int-m.obspm.fr with ID 4B753E8C.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4B753E8C.000/145.238.184.233/pcjas.obspm.fr/obspm.fr/ X-j-chkmail-Score: MSGID : 4B753E8C.000 on smtp-int-m.obspm.fr : j-chkmail score : . : R=. U=. O=. B=0.016 -> S=0.016 X-j-chkmail-Status: Ham X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/106 X-Sequence-Number: 33709 Le 11/02/2010 à 20:39:30-0300, Alvaro Herrera a écrit > 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 Thanks for you help and advise. But for me that's not be a problem because I can stop the database when I want. And my database is huge (~800go) and important but not critical. The critical database is very small (~ 1Go) and for this I use pgdump. Regards. JAS -- Albert SHIH SIO batiment 15 Observatoire de Paris Meudon 5 Place Jules Janssen 92195 Meudon Cedex Heure local/Local time: Ven 12 fév 2010 12:38:53 CET