Re: Index bloat of 4x

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Index bloat of 4x
Дата
Msg-id
24871.1169052974@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
Index bloat of 4x Bill Moran <wmoran@collaborativefusion.com>
Re: Index bloat of 4x "Greg Sabino Mullane" <greg@turnstep.com>
Re: Index bloat of 4x Csaba Nagy <nagy@ecircle-ag.com>
Re: Index bloat of 4x Alvaro Herrera <alvherre@commandprompt.com>
Re: Index bloat of 4x Bill Moran <wmoran@collaborativefusion.com>
Re: Index bloat of 4x Alvaro Herrera <alvherre@commandprompt.com>
Re: Index bloat of 4x Bill Moran <wmoran@collaborativefusion.com>
Re: Index bloat of 4x Tom Lane <tgl@sss.pgh.pa.us>
Re: Index bloat of 4x Bill Moran <wmoran@collaborativefusion.com>
Re: Index bloat of 4x "Ed L." <pgsql@bluepolka.net>
Re: Index bloat of 4x Csaba Nagy <nagy@ecircle-ag.com>
Re: Index bloat of 4x "Ed L." <pgsql@bluepolka.net>
Re: Index bloat of 4x Tom Lane <tgl@sss.pgh.pa.us>
Re: Index bloat of 4x "Jeremy Haile" <jhaile@fastmail.fm>
Re: Index bloat of 4x Csaba Nagy <nagy@ecircle-ag.com>
Re: Index bloat of 4x "Ed L." <pgsql@bluepolka.net>
Re: Index bloat of 4x Bruce Momjian <bruce@momjian.us>
Re: Index bloat of 4x Jim Nasby <decibel@decibel.org>
Re: Index bloat of 4x Alvaro Herrera <alvherre@commandprompt.com>
Re: Index bloat of 4x Bruce Momjian <bruce@momjian.us>
Re: Index bloat of 4x Tom Lane <tgl@sss.pgh.pa.us>
Re: Index bloat of 4x Bruce Momjian <bruce@momjian.us>
Re: Index bloat of 4x Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>
Re: Index bloat of 4x Vivek Khera <vivek@khera.org>
Bill Moran  writes:
> The entire database was around 28M prior to the upgrades, etc.  Immediately
> after the upgrades, it was ~270M.  Following a vacuum full, it dropped to
> 165M.  Following a database-wide reindex, it dropped to 30M.

As Alvaro said, vacuum full doesn't shrink indexes but in fact bloats them.
(Worst case, they could double in size, if the vacuum moves every row;
there's an intermediate state where there have to be index entries for
both old and new copies of each moved row, to ensure things are
consistent if the vacuum crashes right there.)

So the above doesn't sound too unlikely.  Perhaps we should recommend
vac full + reindex as standard cleanup procedure.  Longer term, maybe
teach vac full to do an automatic reindex if it's moved more than X% of
the rows.  Or forget the current vac full implementation entirely, and
go over to something acting more like CLUSTER ...

			regards, tom lane
В списке pgsql-general по дате отправления
От: Richard Huxton
Дата:
От: Alvaro Herrera
Дата:
Сообщение: Re: Index bloat of 4x
FAQ