Re: Unnecessary files that can be deleted/moved in cluster dir?

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: John Abraham <jea(at)hbaspecto(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unnecessary files that can be deleted/moved in cluster dir?
Date: 2013-01-08 05:51:39
Message-ID: 50EBB3EB.1080702@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 4/01/2013 7:31 AM, John Abraham wrote:
> I have a little problem, I let my drive get too full. And then while I was deleting rows to free space, the auto vacuum didn't kick in quite the way I expected, and I ran out of space entirely. So the DB shut down and won't start back up.
>
> So is there anything ( other than the logs in pg_log) that I can delete, or move temporarily, to save some space and allow the database to start up and finish it's vacuum?
Not really. If your filesystem reserves 5% of space for root/emergency
use, as ext3 and ext4 do by default, you can use tune2fs to set the
reserve to zero. This should allow Pg to start up. At this point you
can, if possible, use the COPY command or psql \copy command to get data
from some tables to a location outside the full partition then DROP the
tables.

Older PostgreSQL versions had a VACUUM FULL that did space-recovery
in-place, but it could be very slow and it still wouldn't work reliably
in out-of-disk situations because the indexes could grow as the VACUUM
proceeded. It also wouldn't do you any good if your disk was so full you
couldn't even write new WAL.

If you don't have a space reserve in the file system, you'll need to
move the data directory to somewhere with more room or (if possible)
expand the file system.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2013-01-08 05:58:17 Re: Unnecessary files that can be deleted/moved in cluster dir?
Previous Message Craig Ringer 2013-01-08 05:32:56 Re: Database Design: Maintain Audit Trail of Changes