Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5wgj-0002vz-D0 for pgsql-performance@arkaria.postgresql.org; Thu, 14 Feb 2013 11:09:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1U5wgi-0006kz-T5 for pgsql-performance@arkaria.postgresql.org; Thu, 14 Feb 2013 11:09:12 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5wgi-0006ku-6X for pgsql-performance@postgresql.org; Thu, 14 Feb 2013 11:09:12 +0000 Received: from smtp-outbound-2.vmware.com ([208.91.2.13]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1U5wgb-0007eS-CV for pgsql-performance@postgresql.org; Thu, 14 Feb 2013 11:09:11 +0000 Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 3F68428B2B; Thu, 14 Feb 2013 03:09:01 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id 37FFAB05CF; Thu, 14 Feb 2013 03:09:01 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id F2CD81219D8; Thu, 14 Feb 2013 03:11:58 -0800 (PST) X-Virus-Scanned: amavisd-new at zcs-prod-ext-mta-1.vmware.com Received: from zcs-prod-ext-mta-1.vmware.com ([127.0.0.1]) by localhost (zcs-prod-ext-mta-1.vmware.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q7tXGHIhCTNJ; Thu, 14 Feb 2013 03:11:58 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id BB1321219C8; Thu, 14 Feb 2013 03:11:58 -0800 (PST) Received: from [192.168.1.90] (unknown [10.113.62.14]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA; Thu, 14 Feb 2013 03:11:57 -0800 (PST) Message-ID: <511CC5CA.2000403@vmware.com> Date: Thu, 14 Feb 2013 13:08:58 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Tory M Blue CC: pgsql-performance@postgresql.org Subject: Re: PG_XLOG 27028 files running out of space References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org On 14.02.2013 12:49, Tory M Blue wrote: > My postgres db ran out of space. I have 27028 files in the pg_xlog > directory. I'm unclear what happened this has been running flawless for > years. I do have archiving turned on and run an archive command every 10 > minutes. > > I'm not sure how to go about cleaning this up, I got the DB back up, but > I've only got 6gb free on this drive and it's going to blow up, if I can't > relieve some of the stress from this directory over 220gb. > > What are my options? You'll need to delete some of the oldest xlog files to release disk space. But first you need to make sure you don't delete any files that are still needed, and what got you into this situation in the first place. You say that you "run an archive command every 10 minutes". What do you mean by that? archive_command specified in postgresql.conf is executed automatically by the system, so you don't need to and should not run that manually. After archive_command has run successfully, and the system doesn't need the WAL file for recovery anymore (ie. after the next checkpoint), the system will delete the archived file to release disk space. Clearly that hasn't been working in your system for some reason. If archive_command doesn't succeed, ie. it returns a non-zero return code, the system will keep retrying forever until it succeeds, without deleting the file. Have you checked the logs for any archive_command errors? To get out of the immediate trouble, run "pg_controldata", and make note of this line: Latest checkpoint's REDO WAL file: 000000010000000000000001 Anything older than that file is not needed for recovery. You can delete those, if you have them safely archived. - Heikki -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance