postgresql/src/backend/access
Tom Lane 81b9b5ce49 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
2018-03-02 11:22:42 -05:00
..
brin Support parallel btree index builds. 2018-02-02 13:32:44 -05:00
common Use platform independent type for TupleTableSlot->tts_off. 2018-02-20 15:12:52 -08:00
gin Support parallel btree index builds. 2018-02-02 13:32:44 -05:00
gist Make gistvacuumcleanup() count the actual number of index tuples. 2018-03-02 11:22:42 -05:00
hash Remove redundant IndexTupleDSize macro. 2018-02-28 19:25:54 -05:00
heap Relax overly strict sanity check for upgraded ancient databases 2018-03-01 18:07:46 -03:00
index Local partitioned indexes 2018-01-19 11:49:22 -03:00
nbtree Remove redundant IndexTupleDSize macro. 2018-02-28 19:25:54 -05:00
rmgrdesc Update copyright for 2018 2018-01-02 23:30:12 -05:00
spgist Support parallel btree index builds. 2018-02-02 13:32:44 -05:00
tablesample Update copyright for 2018 2018-01-02 23:30:12 -05:00
transam Minor comment fix 2018-02-17 20:45:02 -05:00
Makefile TABLESAMPLE, SQL Standard and extensible 2015-05-15 14:37:10 -04:00