From: Tom Lane <tgl@sss.pgh.pa.us>
To: josh@agliodbs.com
Cc: Tambet Matiisen <t.matiisen@aprote.ee>
Cc: Bill Chandler <billybobc1210@yahoo.com>
Cc: pgsql-perform <pgsql-performance@postgresql.org>
Subject: Re: Question on REINDEX
Date: Tue, 19 Apr 2005 14:02:34 -0400
Message-ID: <23183.1113933754@sss.pgh.pa.us> (raw)
In-Reply-To: <200504191056.16688.josh@agliodbs.com>
References: <A66A11DBF5525341AEF6B8DE39CDE77008806E@black.aprote.com>
<200504190857.16634.josh@agliodbs.com>
<22304.1113927842@sss.pgh.pa.us>
<200504191056.16688.josh@agliodbs.com>
Josh Berkus <josh@agliodbs.com> writes:
>> Not at all. What it says is that you expect 100% of the pages to have
>> useful amounts of free space, which is a *much* weaker criterion.
> Hmmmm .... actually, it seems like, if you are vacuuming regularly, you only
> *do* need to track pages that have been touched by DELETE or UPDATE. Other
> pages would have already been vacuumed and not have any useful free space
> left. Yes?
Well, the space has to be remembered until it's reused. On the other
hand, there's nothing that says FSM has to be aware of all the free
space available at all times --- the real criterion to avoid bloat
is that after a VACUUM, enough space is logged in FSM to satisfy all
the insertions that will happen before the next VACUUM. So you could
have situations where free space is temporarily forgotten (for lack
of slots in FSM), but other free space gets used instead, and eventually
a later VACUUM re-finds that free space and puts it into FSM.
I think it's true that the more often you vacuum, the less FSM you need,
but this doesn't have much to do with how much free space is actually
out there on disk. It's because you only need enough FSM to record the
free space you'll need until the next vacuum.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, t.matiisen@aprote.ee, billybobc1210@yahoo.com
Subject: Re: Question on REINDEX
In-Reply-To: <23183.1113933754@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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