Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)
Дата
Msg-id 24338.1031112310@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Call closed: Almost happy ending (from "Data files became huge with no apparent reason" thread)  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Martijn van Oosterhout <kleptog@svana.org> writes:
> I actually had a thought last night. REINDEX recreates the index, probably
> with *all* rows in the table, whether or not they are still active. Thus, to
> get maximum effect from REINDEX, you need to VACUUM first.

No.  REINDEX boils down to IndexBuildHeapScan(), which uses
HeapTupleSatisfiesVacuum() to decide which tuples are worth indexing;
the tuples that get indexed are *exactly* the same ones that would
survive VACUUM.

In recent releases, anyway; before 7.2 things might have been flakier.

            regards, tom lane

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

Предыдущее
От: Darren Ferguson
Дата:
Сообщение: Re: parameterized views?
Следующее
От: "Colin Fox"
Дата:
Сообщение: referential integrity with inheritance