Thread: Deleting a database

Deleting a database

From
Juan Miguel
Date:
This is a little question :

In postgres, "delete database dbsample", frees the disk space used for
this DB?, or I have to drop the files manually ?
I wondered this question, because I read that when you delete records,
you must run vacuum for freeing the space.

Thanks.


Re: Deleting a database

From
"scott.marlowe"
Date:
On Tue, 30 Mar 2004, Juan Miguel wrote:

> This is a little question :
>
> In postgres, "delete database dbsample", frees the disk space used for
> this DB?, or I have to drop the files manually ?
> I wondered this question, because I read that when you delete records,
> you must run vacuum for freeing the space.

the whole database instance is dropped, no need to clean up. Same is true
for dropped tables, indexes, or any other complete object like that.

The only thing vacuum recovers is space within an object, like deleted
tuples or index entries.