Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 153512E005A for ; Thu, 15 May 2008 18:17:02 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55054-09 for ; Thu, 15 May 2008 18:16:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from dog.comp.uvic.ca (dog.comp.uvic.ca [142.104.5.222]) by developer.postgresql.org (Postfix) with ESMTP id 285442E0059 for ; Thu, 15 May 2008 18:16:50 -0300 (ADT) Received: from [142.104.191.242] (strike.comp.uvic.ca [142.104.191.242]) by dog.comp.uvic.ca (8.13.8/8.13.8) with ESMTP id m4FLGnJa021488 for ; Thu, 15 May 2008 14:16:49 -0700 Message-ID: <482CA841.8000605@uvic.ca> Date: Thu, 15 May 2008 14:16:49 -0700 From: Evan Rempel User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Re: WAL rotation question version 8.3.0 References: <482CA173.7020204@uvic.ca> <20080515211353.GO8221@alvh.no-ip.org> In-Reply-To: <20080515211353.GO8221@alvh.no-ip.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-UVic-Virus-Scanned: OK - Passed virus scan by Sophos (sophie) on dog X-UVic-Spam-Scan: dog.comp.uvic.ca Not_scanned_LOCAL X-Scanned-By: MIMEDefang 2.63 on 142.104.5.91 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200805/141 X-Sequence-Number: 29225 Alvaro Herrera wrote: > Evan Rempel wrote: > >> Now to the question. >> >> Once the archive_command starts lying about its success, postgresql deletes >> a number of the xlog files that it has been told have been successfuly archived. >> Why does it do this? Can I control it? Can I turn it off? > > Because they're no longer needed. > > If you want to keep those files, make the archive_command not lie. Normally posgres will rename the old WAL files that have been archived and are no longer needed, keeping the number of WAL files constant. In this case, it actually deletes them. Why is the behaviour different? -- Evan Rempel