X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 2AF449DCA48 for ; Tue, 7 Mar 2006 11:07:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 38283-07 for ; Tue, 7 Mar 2006 11:07:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 148B79DC840 for ; Tue, 7 Mar 2006 11:07:36 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id k27F7dZh018485; Tue, 7 Mar 2006 10:07:40 -0500 (EST) To: "Joost Kraaijeveld" cc: "Pgsql-Admin (E-mail)" Subject: Re: Can I delete all WAL logfiles if the database is shutdown without errors? In-reply-to: References: Comments: In-reply-to "Joost Kraaijeveld" message dated "Tue, 07 Mar 2006 13:54:58 +0100" Date: Tue, 07 Mar 2006 10:07:39 -0500 Message-ID: <18484.1141744059@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.112 required=5 tests=[AWL=0.112] X-Spam-Score: 0.112 X-Spam-Level: X-Archive-Number: 200603/65 X-Sequence-Number: 20822 "Joost Kraaijeveld" writes: > Can I safely delete all the WAL log files in PGDATA/pg_xlog directory if the database has been shut down correctly, because I lowered the number of logfiles in postgresql.conf? All but the one holding the latest checkpoint record (pg_controldata will tell you which one that is). I'm not sure why you'd bother though. The next checkpoint should remove any excess log files, there's no need to do it manually. regards, tom lane