Re: estimating the need for VACUUM FULL and REINDEX

From: Guillaume Cottenceau <gc(at)mnc(dot)ch>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: estimating the need for VACUUM FULL and REINDEX
Date: 2007-05-11 15:31:44
Message-ID: 87lkfve5r3.fsf@meuh.mnc.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Guillaume Cottenceau <gc 'at' mnc.ch> writes:

> With that in mind, I've tried to estimate how much benefit would
> be brought by running VACUUM FULL, with the output of VACUUM
> VERBOSE. However, it seems that for example the "removable rows"
> reported by each VACUUM VERBOSE run is actually reused by VACUUM,
> so is not what I'm looking for.

I've tried to better understand how autovacuum works (we use 7.4)
to see if a similar mechanism could be used in 7.4 (e.g. run
VACUUM ANALYZE often enough to not end up with a need to VACUUM
FULL).

The autovacuum daemon uses statistics collected thanks to
stats_row_level. However, inside pg_stat_user_tables, the values
n_tup_upd and n_tup_del seem to be reported from pg startup and
never reset, whereas the information from previous VACUUM would
be needed here, if I understand correctly. Is there anything that
can be done from that point on with existing pg information, or
I'd need e.g. to remember the values of my last VACUUM myself?

Thanks.

--
Guillaume Cottenceau, MNC Mobile News Channel SA, an Alcatel-Lucent Company
Av. de la Gare 10, 1003 Lausanne, Switzerland - direct +41 21 317 50 36

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Alvaro Herrera 2007-05-11 17:25:04 Re: estimating the need for VACUUM FULL and REINDEX
Previous Message Liviu Ionescu 2007-05-11 14:07:57 BUG #3270: limit < 16 optimizer behaviour