pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: Disk is full, what's cool to get rid of?
Date: Thu, 27 Jul 2006 16:36:05 -0400
Message-ID: <4529.1154032565@sss.pgh.pa.us> (raw)
In-Reply-To: <20060727163727.GC27075@phlogiston.dyndns.org>
References: <44C8E7EB.3040608@myemma.com>
	<20060727163727.GC27075@phlogiston.dyndns.org>

Andrew Sullivan <ajs@crankycanuck.ca> writes:
> If the data isn't critical, you maybe could truncate a table to clear
> enough space.  Deleting anything under pg_xlog is more or less
> guaranteed to mean your database is garbage.

If you're desperate you could shut down the postmaster, run
pg_resetxlog, restart the postmaster.  This would cut xlog contents
to the minimum --- however, they'd probably soon grow back to whatever
they are now, so it's not much of a long-term solution.  It might give
you some breathing room to look for other places to trim though.

If the database hasn't been maintained well then you likely are
suffering from table bloat and/or index bloat.  A desperation measure
for fixing that is drop all indexes, vacuum full, recreate all indexes.
(There are other procedures you may find recommended, such as CLUSTER,
but they have transient disk-space requirements that you're not gonna
be able to afford when your back is to the wall.)

			regards, tom lane



view thread (10+ messages)  latest in thread

Message-ID: <4529.1154032565@sss.pgh.pa.us>
Permalink:  ../4529.1154032565@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4529.1154032565@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ajs@crankycanuck.ca
  Subject: Re: Disk is full, what's cool to get rid of?
  In-Reply-To: <4529.1154032565@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox