1

I have an Ubuntu server running PostgreSQL and a very light weight custom web-server.

I knew this would happen but I was too busy, and now the disk has 0 bytes free. I don't need all the data in the database and I've already deleted lots of rows in some tables, but the space won't be freed until the database is "vacuumed", and to do the vacuum I need lots of free disk space.

What can I do? This is an Amazon EC2 instance.

2
  • Can you paste the output of "df -k"?
    – MadHatter
    Mar 15, 2011 at 12:08
  • @MadHatter @Split71, Sorry, I freed like 30MB by removing some compressed logs. then removed one of my table indexes which freed up like 7GB and then did a vacuum.
    – Ali
    Mar 15, 2011 at 13:23

2 Answers 2

1

You could create a new EBS volume, attach it to the server, copy the postgres data to it (stopping postgres first of course) and then mount it at the same location as the old data. Make the EBS volume as big as you require and then some, and then restart postgres.

2
  • this is the natural course of events but I didn't want to take the server down right now.
    – Ali
    Mar 15, 2011 at 13:24
  • There's no need to take the server down (as such). This could all be done very quickly, with the only downtime being to copy the database to the new EBS volume and then mounting it. The time the copy job will take depends on the size I guess, but that's the only real downtime that you would have to deal with. Edit: I see you've fixed the issue so it's all good anyway!
    – djk
    Mar 15, 2011 at 13:53
0

I second madhatter with a df -k output. Also, i'm not sure how Amazon EC2 works in these types of cases, but i'm sure more storage is an option.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .