pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedVacuum x Vacuum full
3+ messages / 3 participants
[nested] [flat]
* Vacuum x Vacuum full
@ 2004-06-25 16:42 Carlos Benkendorf <chbenkendorf@yahoo.com>
2004-06-25 17:28 ` Re: Vacuum x Vacuum full Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-06-25 17:35 ` Re: Vacuum x Vacuum full Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 2 replies; 3+ messages in thread
From: Carlos Benkendorf @ 2004-06-25 16:42 UTC (permalink / raw)
To: pgsql-admin
I would like to know if space disk is free to the Operational System
during a standard vacuum (without the full option)?
I found in section "21.1.1 Recovering disk space" of Postgresql 7.4.2 manual
something about it.
"The standard form of VACUUM is best used with the goal of maintaining a fairly level steady-state usage of disk space.The standard form finds old row versions and makes their space available for re-use within the table, but it does not try very hard to shorten the table file and return disk space to the operating system. "
Even so it is not clear. They say the space will be available for re-use
within the table so I realized the space will not be available to
the operational system. But they also say the command "does not try very
hard to shorten the table file and return disk space to the operating
system" what means to me that it could sometimes free space to the
operating system.
I could not clear my doubt. Will the standard form, free disk space to the
operational system or not?
I did some tests and discovered that the standard form frees disk space
to the operational system. But if the standard form already frees it why the full form
will do different?
Thanks in advance!
---------------------------------
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Vacuum x Vacuum full
2004-06-25 16:42 Vacuum x Vacuum full Carlos Benkendorf <chbenkendorf@yahoo.com>
@ 2004-06-25 17:28 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
1 sibling, 0 replies; 3+ messages in thread
From: Stephan Szabo @ 2004-06-25 17:28 UTC (permalink / raw)
To: Carlos Benkendorf <chbenkendorf@yahoo.com>; +Cc: pgsql-admin
On Fri, 25 Jun 2004, Carlos Benkendorf wrote:
> I would like to know if space disk is free to the Operational System
> during a standard vacuum (without the full option)?
>
> I found in section "21.1.1 Recovering disk space" of Postgresql 7.4.2 manual
> something about it.
>
> "The standard form of VACUUM is best used with the goal of maintaining a
> fairly level steady-state usage of disk space.The standard form finds
> old row versions and makes their space available for re-use within the
> table, but it does not try very hard to shorten the table file and
> return disk space to the operating system. "
>
> Even so it is not clear. They say the space will be available for re-use
> within the table so I realized the space will not be available to
> the operational system. But they also say the command "does not try very
> hard to shorten the table file and return disk space to the operating
> system" what means to me that it could sometimes free space to the
> operating system.
>
> I could not clear my doubt. Will the standard form, free disk space to the
> operational system or not?
Sometimes. If there are empty pages at the end of the file, it can attempt
to shorten the file. If there's data at the end of the file, it won't.
> I did some tests and discovered that the standard form frees disk space
> to the operational system. But if the standard form already frees it why
> the full form will do different?
Full can move tuples between pages which can free up pages at the end of
the file which can allow it to shorten further.
For example, if you insert enough rows to say have 2 pages in your table
file and delete all the entries on the first page and not quite all on the
second, vacuum (nonfull) is not going to be able to truncate the file
because the data is in the second page. Vacuum full will move live rows
to the first page freeing up the entire second page and making it
available for release.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Vacuum x Vacuum full
2004-06-25 16:42 Vacuum x Vacuum full Carlos Benkendorf <chbenkendorf@yahoo.com>
@ 2004-06-25 17:35 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 3+ messages in thread
From: Tom Lane @ 2004-06-25 17:35 UTC (permalink / raw)
To: Carlos Benkendorf <chbenkendorf@yahoo.com>; +Cc: pgsql-admin
Carlos Benkendorf <chbenkendorf@yahoo.com> writes:
> I could not clear my doubt. Will the standard form, free disk space to the
> operational system or not?
It will release space to the OS if (a) there are one or more completely
empty pages at the end of the table and (b) it is able to get an
exclusive lock on the table (ie, there's not anyone else using the table
at the time).
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-06-25 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-06-25 16:42 Vacuum x Vacuum full Carlos Benkendorf <chbenkendorf@yahoo.com>
2004-06-25 17:28 ` Stephan Szabo <sszabo@megazone.bigpanda.com>
2004-06-25 17:35 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox