Reclaiming space

From: "Christopher Gorge A(dot) Marges" <gorge(at)apollo(dot)com(dot)ph>
To: pgsql-general(at)postgresql(dot)org
Subject: Reclaiming space
Date: 2010-09-21 12:39:39
Message-ID: 4C98A78B.80200@apollo.com.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We are using 7.4.13 and run the pg_autovacuum. Over the years, the
database has grown so our maintenance plan was to "move" everything
except for the last year. Since the server is kept up always using a
full vacuum is out of the question. However the space is running out
and we tried installing contrib/dbsize to see which tables were using up
space. The report of database_size is correct, we are using up to 120G
of space, but adding up the reported sizes from relation_size does not
add up. So where does the unused space go?

The steps we do to move the data is as follows:
1) dump the data (per table)
2) restore the data to another server
3) delete the dumped records from the production server
4) vacuum analyze

Is there anyway to reclaim the space (the space used up by the tables
themselves are less than 20G).

------------------------------------------------------------------------
*Christopher Gorge A. Marges*
/Software Services/
/Apollo Technologies, Inc./

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Arjen Nienhuis 2010-09-21 12:40:30 Re: varchar lengths
Previous Message Merlin Moncure 2010-09-21 11:54:36 Re: where does postgres keep the query result until it is returned?