pgsql: Make gistvacuumcleanup() count the actual number of indextuples

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Make gistvacuumcleanup() count the actual number of indextuples
Дата
Msg-id E1ernSV-0002g4-Bi@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Make gistvacuumcleanup() count the actual number of index tuples.

Previously, it just returned the heap tuple count, which might be only an
estimate, and would be completely the wrong thing if the index is partial.
Since this function scans every index page anyway to find free pages,
it's practically free to count the surviving index tuples.  Let's do that
and return an accurate count.

This is easily visible as a wrong reltuples value for a partial GiST
index following VACUUM, so back-patch to all supported branches.

Andrey Borodin, reviewed by Michail Nikolaev

Discussion: https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org

Branch
------
REL9_3_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6b56f07525a04a22260d3f9650b02c26d2d6c366

Modified Files
--------------
src/backend/access/gist/gistvacuum.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: pgsql: Fix msvc builds for ActivePerl > 5.24
Следующее
От: Fujii Masao
Дата:
Сообщение: pgsql: Improve tab-completion for ALTER INDEX RESET/SET.