postgresql/src
Peter Geoghegan 48e1291342 Fix nbtree cleanup-only VACUUM stats inaccuracies.
Logic for counting heap TIDs from posting list tuples (added by commit
0d861bbb) was faulty.  It didn't count any TIDs/index tuples in the
event of no callback being set.  This meant that we incorrectly counted
no index tuples in clean-up only VACUUMs, which could lead to
pg_class.reltuples being spuriously set to 0 in affected indexes.

To fix, go back to counting items from the page in cases where there is
no callback.  This approach isn't very accurate, but it works well
enough in practice while avoiding the expense of accessing every index
tuple during cleanup-only VACUUMs.

Author: Peter Geoghegan <pg@bowt.ie>
Reported-By: Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
https://postgr.es/m/20201023174451.69e358f1@firost
Backpatch: 13-, where nbtree deduplication was introduced
2020-11-04 18:42:27 -08:00
..
backend Fix nbtree cleanup-only VACUUM stats inaccuracies. 2020-11-04 18:42:27 -08:00
bin pg_rewind: Refactor the abstraction to fetch from local/libpq source. 2020-11-04 11:21:18 +02:00
common Second thoughts on TOAST decompression. 2020-11-02 11:25:18 -05:00
fe_utils Don't use custom OID symbols in pg_type.dat, either. 2020-10-29 13:33:38 -04:00
include Remove underflow error in float division with infinite divisor. 2020-11-04 18:11:15 -05:00
interfaces Fix some grammar and typos in comments and docs 2020-11-02 15:14:41 +09:00
makefiles
pl Don't use custom OID symbols in pg_type.dat, either. 2020-10-29 13:33:38 -04:00
port
template
test Remove underflow error in float division with infinite divisor. 2020-11-04 18:11:15 -05:00
timezone
tools pg_rewind: Refactor the abstraction to fetch from local/libpq source. 2020-11-04 11:21:18 +02:00
tutorial Remove support for postfix (right-unary) operators. 2020-09-17 19:38:05 -04:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib
nls-global.mk