Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 87C5C9F9F7B for ; Fri, 22 Dec 2006 14:14:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 28833-07 for ; Fri, 22 Dec 2006 14:14:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 425509F9F47 for ; Fri, 22 Dec 2006 14:14:21 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id kBMIEIMq026239; Fri, 22 Dec 2006 13:14:18 -0500 (EST) To: "Kevin Grittner" cc: "Jeremy Haile" , pgsql-performance@postgresql.org Subject: Re: URGENT: Out of disk space pg_xlog In-reply-to: <458BC058.EE98.0025.0@wicourts.gov> References: <1166803606.2828.281701761@webmail.messagingengine.com> <1166806378.10592.281708161@webmail.messagingengine.com> <458BC058.EE98.0025.0@wicourts.gov> Comments: In-reply-to "Kevin Grittner" message dated "Fri, 22 Dec 2006 11:24:08 -0600" Date: Fri, 22 Dec 2006 13:14:18 -0500 Message-ID: <26238.1166811258@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/499 X-Sequence-Number: 22555 "Kevin Grittner" writes: > As I understand it, the log space accumulates for the oldest transaction > which is still running, and all transactions which started after it. No, pg_xlog can be truncated as soon as a checkpoint occurs. If Jeremy wasn't using archive_command then the only possible explanation for bloated pg_xlog is that checkpoints were failing. Which is not unlikely if the *data* partition runs out of space. Were there gripes in the log before the system crash? The scenario we've seen in the past is * data partition out of space, so writes fail * each time Postgres attempts a checkpoint, writes fail, so the checkpoint fails. No data loss at this point, the dirty buffers just stay in memory. * pg_xlog bloats because we can't truncate away old segments * eventually pg_xlog runs out of space, at which point we PANIC and can't continue running the database Once you free some space on the data partition and restart, you should be good to go --- there will be no loss of committed transactions, since all the operations are in pg_xlog. Might take a little while to replay all that log though :-( regards, tom lane