Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YugfP-0007o1-TX for pgsql-admin@arkaria.postgresql.org; Tue, 19 May 2015 12:30:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YugfP-0004vd-9g for pgsql-admin@arkaria.postgresql.org; Tue, 19 May 2015 12:30:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YugfO-0004vW-5w for pgsql-admin@postgresql.org; Tue, 19 May 2015 12:30:38 +0000 Received: from imx3.etecsa.cu ([200.55.152.137]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YugfG-0007SE-3R for pgsql-admin@postgresql.org; Tue, 19 May 2015 12:30:37 +0000 Received: from Unknown ([192.168.91.45] helo=mn3.etecsa.cu) by imx3.etecsa.cu with ESMTP id t8T5eKJw49060; Tue, 19 May 2015 08:29:05 -0400 Received: (qmail 7357 invoked by uid 11185); 19 May 2015 13:29:35 -0000 Received: from 192.168.91.6 by mn3.etecsa.cu (envelope-from , uid 502) with qmail-scanner-2.08 (spamassassin: 3.2.5. Clear:RC:1(192.168.91.6):. Processed in 0.028262 secs); 19 May 2015 13:29:35 -0000 Received: from unknown (HELO webmail.etecsa.cu) ([192.168.91.6]) (envelope-sender ) by mn2.etecsa.cu (qmail-ldap-1.03) with SMTP for ; 19 May 2015 13:29:35 -0000 Received: from 192.168.207.54 (SquirrelMail authenticated user gilberto.castillo) by webmail.etecsa.cu with HTTP; Tue, 19 May 2015 08:29:34 -0500 (GMT+5) Message-ID: <59237.192.168.207.54.1432042174.squirrel@webmail.etecsa.cu> In-Reply-To: References: <5FB35597-0F52-4832-973D-908F5B01BE9B@bekk.no> Date: Tue, 19 May 2015 08:29:34 -0500 (GMT+5) Subject: Re: Deleting old WAL-files From: "Gilberto Castillo" To: "Albe Laurenz" Cc: "'Gustav Karlsson *EXTERN*'" , "pgsql-admin@postgresql.org" Reply-To: gilberto.castillo@etecsa.cu User-Agent: SquirrelMail/1.4.8-5.el5_4.10 MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal X-SpamTest-Envelope-From: gilberto.castillo@etecsa.cu X-SpamTest-Info: Profiles 72422 [Jan 28 2015] X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0285], KAS30/SDK/Release X-Anti-Virus: Kaspersky Mail Gateway, version: 5.6.28/RELEASE, bases: 20140401T050822 #7726142, check: 20150519 clean Content-Type: multipart/mixed; boundary="=t8T7eSCm58841=imx3.etecsa.cu=" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org This is a multi-part message in MIME format. --=t8T7eSCm58841=imx3.etecsa.cu= Content-Disposition: inline Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit > Gustav Karlsson wrote: >> I am looking for a good method of determining what WAL-segments can be >> deleted from our backup- >> archive. >> >> We are using Postgresql 9.3 and do nightly basebackups along with >> archiving of WAL-segments. >> >> We would like to prevent our backup-archive from growing forever, and >> thus delete basebackups and WAL- >> segments older than say 1 year. >> >> Is there a good way of finding the oldest WAL-segment needed for a given >> basebackup? (If not, what is >> the typical method for deleting old WAL-segments?) > > The backup contains a file "backup_label" which contains a line like > > START WAL LOCATION: 0/83000028 (file 000000010000000000000083) > > That is the oldest file needed for recovery. > > But a simple solution would be to keep WAL archives for one day more than > your oldest > base backup, that way you can never miss a WAL archive that you need. See you: http://www.postgresql.org/docs/current/static/pgarchivecleanup.html Saludos, Gilberto Castillo ETECSA, La Habana, Cuba --=t8T7eSCm58841=imx3.etecsa.cu= Content-Type: text/plain Content-Disposition: inline --- This message was processed by Kaspersky Mail Gateway 5.6.28/RELEASE running at host imx3.etecsa.cu Visit our web-site: , --=t8T7eSCm58841=imx3.etecsa.cu= Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin --=t8T7eSCm58841=imx3.etecsa.cu=--