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

Re: why the DB file size does not reduce when 'delete' the data in DB?

From: "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>
To: Jaruwan Laongmal <jaruwan(at)gits(dot)net(dot)th>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: why the DB file size does not reduce when 'delete' the data in DB?
Date: 2001-03-02 12:36:02
Message-ID: Pine.LNX.4.10.10103020934450.23992-100000@math.unl.edu.ar (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-sql
On Fri, 2 Mar 2001, Jaruwan Laongmal wrote:

> I had deleted a very large number of records out of my SQL table in order to
> decrease the harddisk space.  But after I use command 'ls -l
> /usr/local/pgsql/data/base/', it is found that the size of concerning files
> do not reduce due to the effect of 'delete' SQL command.  What should I do
> if I would like to decrease the harddisk space?

Postgres will only mark them as deleted, but the rows will stay in the
DB.
Do a vacuum on the database and the deleted rows will be eliminated.

Saludos... ;-)

System Administration: It's a dirty job, 
but someone told I had to do it.
-----------------------------------------------------------------
Martín Marqués			email: 	martin(at)math(dot)unl(dot)edu(dot)ar
Santa Fe - Argentina		http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------


In response to

pgsql-hackers by date

Next:From: Jaruwan LaongmalDate: 2001-03-02 12:40:42
Subject: why the DB file size does not reduce when 'delete' the data in DB?
Previous:From: The Hermit HackerDate: 2001-03-02 12:04:45
Subject: Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?

pgsql-sql by date

Next:From: Jaruwan LaongmalDate: 2001-03-02 12:40:42
Subject: why the DB file size does not reduce when 'delete' the data in DB?
Previous:From: The Hermit HackerDate: 2001-03-02 12:04:45
Subject: Re: [HACKERS] why the DB file size does not reduce when 'delete' the data in DB?

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