summaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/sql/postgres_fdw.sql
diff options
context:
space:
mode:
authorPeter Geoghegan <pg@bowt.ie>2020-11-04 18:42:24 -0800
committerPeter Geoghegan <pg@bowt.ie>2020-11-04 18:42:24 -0800
commit02c9386ca4f706364904be2720e2d09916e2b619 (patch)
treecf5b6d7defa065c82c221c1cb0e47799c07e833c /contrib/postgres_fdw/sql/postgres_fdw.sql
parent82d4a2a7d63e79f6a6724f366cfaa4beed6b8326 (diff)
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
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
0 files changed, 0 insertions, 0 deletions