Re: Unnecessary files that can be deleted/moved in cluster dir? - Mailing list pgsql-general

From Craig Ringer
Subject Re: Unnecessary files that can be deleted/moved in cluster dir?
Date
Msg-id 50EBB3EB.1080702@2ndquadrant.com
Whole thread Raw
In response to Unnecessary files that can be deleted/moved in cluster dir?  (John Abraham <jea@hbaspecto.com>)
List 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
vacuumdidn't kick in quite the way I expected, and I ran out of space entirely.   So the DB shut down and won't start
backup. 
>
> So is there anything ( other than the logs in pg_log) that I can delete, or move temporarily, to save some space and
allowthe 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



pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Database Design: Maintain Audit Trail of Changes
Next
From: Raghavendra
Date:
Subject: Re: Unnecessary files that can be deleted/moved in cluster dir?