forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit48e1291
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 parentc732c3f commit48e1291
1 file changed
+14
-1
lines changedLines changed: 14 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
933 | 933 |
| |
934 | 934 |
| |
935 | 935 |
| |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
936 | 942 |
| |
937 | 943 |
| |
938 | 944 |
| |
| |||
1394 | 1400 |
| |
1395 | 1401 |
| |
1396 | 1402 |
| |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1397 | 1408 |
| |
1398 | 1409 |
| |
1399 | 1410 |
| |
1400 |
| - | |
| 1411 | + | |
1401 | 1412 |
| |
| 1413 | + | |
| 1414 | + | |
1402 | 1415 |
| |
1403 | 1416 |
| |
1404 | 1417 |
| |
|
0 commit comments
Comments
(0)