From: Jim C. Nasby <jnasby@pervasive.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-admin@postgresql.org, Gregory Maxwell <gmaxwell@gmail.com>
Subject: Re: Bloated pg_shdepend_depender_index
Date: Fri, 24 Mar 2006 10:43:26 -0600
Message-ID: <20060324164325.GS90527@pervasive.com> (raw)
In-Reply-To: <4553.1143212521@sss.pgh.pa.us>
References: <e692861c0603231716j63d712eemfe7292ff968801a9@mail.gmail.com>
<e692861c0603231958m11472300gb1c32cf0e998a3cd@mail.gmail.com>
<27588.1143175698@sss.pgh.pa.us>
<200603241150.20021.peter_e@gmx.net>
<4553.1143212521@sss.pgh.pa.us>
On Fri, Mar 24, 2006 at 10:02:01AM -0500, Tom Lane wrote:
> Actually, I wonder whether VACUUM FULL shouldn't be thrown away and
> replaced by something else entirely. That algorithm only really works
> nicely when just a small percentage of the rows need to be moved to
> re-compact the table --- if you're moving lots of rows, it makes the
> index bloat situation *worse* not better because of the transient need
> for index entries pointing to both copies of moved rows. Lazy VACUUM
> has become the de-facto standard for situations where there's not a huge
> amount of empty space, and so it's not clear where the sweet spot is for
> VACUUM FULL anymore. If you've got enough disk space, a rewrite (like
Therein lies part of the problem: enough disk space. Now that we're
seeing more and more use of PostgreSQL in data warehousing, it's
becomming less safe to assume you'll have enough disk space to fix bloat
on large tables. Plus I suspect a lot of folks wouldn't be able to
tolerate being locked out of a table for that long (of course that
applies to VACUUM FULL as well...)
There's a sorta-kinda solution available for the heap, involving
repeated cycles of vacuum and then update all the tuples off the last
page, and hopefully there will be some better possibilities in 8.2. But
that still leaves indexes. Are there any improvements that can be made
in that regard? I know it's a lot harder to move index tuples around,
but surely it's not impossible (I'd hope). Or as an alternative, you
could 'move' index tuples by updating tuples in the heap and having some
means to direct what index pages the new entries should favor.
If there was some relatively easy means of compacting tables and indexes
that could operate in the background (ie: doesn't need any table-level
locks) I suspect most of the need for things like VACUUM FULL, REINDEX,
and perhaps even CLUSTER would go away.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: jnasby@pervasive.com, tgl@sss.pgh.pa.us, peter_e@gmx.net, gmaxwell@gmail.com
Subject: Re: Bloated pg_shdepend_depender_index
In-Reply-To: <20060324164325.GS90527@pervasive.com>
References: <e692861c0603231716j63d712eemfe7292ff968801a9@mail.gmail.com> <e692861c0603231958m11472300gb1c32cf0e998a3cd@mail.gmail.com> <27588.1143175698@sss.pgh.pa.us> <200603241150.20021.peter_e@gmx.net> <4553.1143212521@sss.pgh.pa.us> <20060324164325.GS90527@pervasive.com>
* 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