- Notifications
You must be signed in to change notification settings - Fork28
Commit02c9386
committed
Fix nbtree cleanup-only VACUUM stats inaccuracies.
Logic for counting heap TIDs from posting list tuples (added by commit0d861bb) was faulty. It didn't count any TIDs/index tuples in theevent of no callback being set. This meant that we incorrectly countedno index tuples in clean-up only VACUUMs, which could lead topg_class.reltuples being spuriously set to 0 in affected indexes.To fix, go back to counting items from the page in cases where there isno callback. This approach isn't very accurate, but it works wellenough in practice while avoiding the expense of accessing every indextuple 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@firostBackpatch: 13-, where nbtree deduplication was introduced1 parent82d4a2a commit02c9386
1 file changed
+14
-1
lines changedLines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
926 | 926 |
| |
927 | 927 |
| |
928 | 928 |
| |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
929 | 935 |
| |
930 | 936 |
| |
931 | 937 |
| |
| |||
1389 | 1395 |
| |
1390 | 1396 |
| |
1391 | 1397 |
| |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
1392 | 1403 |
| |
1393 | 1404 |
| |
1394 | 1405 |
| |
1395 |
| - | |
| 1406 | + | |
1396 | 1407 |
| |
| 1408 | + | |
| 1409 | + | |
1397 | 1410 |
| |
1398 | 1411 |
| |
1399 | 1412 |
| |
|
0 commit comments
Comments
(0)