Skip site navigation (1) Skip section navigation (2)

Re: Database size

From: Francisco Reyes <lists(at)stringsutils(dot)com>
To: choksi <choksi(dot)dhaval(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Database size
Date: 2007-06-15 17:15:37
Message-ID: cone.1181927737.662704.53974.5001@35st.simplicato.com (view raw or flat)
Thread:
Lists: pgsql-performance
choksi writes:

> I had a database which uses to hold some 50 Mill records and disk
> space used was 103 GB. I deleted around 34 Mill records but still the
> disk size is same. Can some on please shed some light on this.

When records are deleted they are only marked in the database.
When you run vacuum in the database that space will be marked so new data 
can use the space.

To lower the space used you need to run "vacuum full".
That however can take a while and I think it will lock the database for 
some operations. 

In response to

Responses

pgsql-performance by date

Next:From: Gábriel ÁkosDate: 2007-06-15 17:42:48
Subject: Re: Replication
Previous:From: Devrim GÜNDÜZDate: 2007-06-15 15:16:41
Subject: Re: Replication

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group