Re: reducing bloat in pg_statistic

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: reducing bloat in pg_statistic
Дата
Msg-id 646.1134775423@sss.pgh.pa.us
обсуждение исходный текст
Ответ на reducing bloat in pg_statistic  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-hackers
Robert Treat <xzilla@users.sourceforge.net> writes:
> I'm looking at a postgresql 7.3 database that has gotten rather bloated
> in pg_statistic:
> I am trying to figure out a way to shrink this down to something more
> reasonable, with the caveat of not restarting the database server.

You haven't got too many options in 7.3, but it might work reasonably
well to dodelete from pg_statistic;vacuum full pg_statistic;re-analyze to repopulate
vacuum full with no records should take well under a minute.  It won't
shrink the index, but it'll fix the table bloat which seems the worst
part.

The main gotcha here is that any queries started before you can finish
the re-analyze will not have the benefit of statistics; in the worst
case they might choose bad enough plans that you'll wish you had not
done it.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: second "begin transaction" emits a warning
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Re: Which qsort is used