Skip site navigation (1) Skip section navigation (2)

Re: URGENT: Out of disk space pg_xlog

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Jeremy Haile" <jhaile(at)fastmail(dot)fm>,<pgsql-performance(at)postgresql(dot)org>
Subject: Re: URGENT: Out of disk space pg_xlog
Date: 2006-12-22 18:37:23
Message-ID: 458BD182.EE98.0025.0@wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-performance
>>> On Fri, Dec 22, 2006 at 12:14 PM, in message
<26238(dot)1166811258(at)sss(dot)pgh(dot)pa(dot)us>,
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote: 
> "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> 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.
 
Thanks.  Good to know.  I had missed that.
 
> 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
 
So, at this point, if space is freed on the data partition somehow,
Postgres recovers with no problems?  (i.e.,, the database is still
running and no requests have been terminated abnormally due to the space
problems?)
 
> * 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 :- (
 
Just to confirm what I would assume at this point -- non-committed
transactions should roll back cleanly; it is reasonable to assume no
corruption at this point?
 
Thanks,
 
-Kevin
 


In response to

Responses

pgsql-performance by date

Next:From: Tom LaneDate: 2006-12-22 18:46:10
Subject: Re: URGENT: Out of disk space pg_xlog
Previous:From: Tom LaneDate: 2006-12-22 18:14:18
Subject: Re: URGENT: Out of disk space pg_xlog

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group