Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Geoghegan2020-11-05 02:42:27 +0000
committerPeter Geoghegan2020-11-05 02:42:27 +0000
commit48e1291342dd7771cf8c67aa1d7ec1f394b95dd8 (patch)
tree431db4ca32c3fb4a600da2a4bd99591a11642f8e /src/backend/commands/lockcmds.c
parentc732c3f8c122009de373cff9b44b5cf0992ba1bf (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 'src/backend/commands/lockcmds.c')
0 files changed, 0 insertions, 0 deletions