forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitccd6504
committed
Make gistvacuumcleanup() count the actual number of index tuples.
Previously, it just returned the heap tuple count, which might be only anestimate, and would be completely the wrong thing if the index is partial.Since this function scans every index page anyway to find free pages,it's practically free to count the surviving index tuples. Let's do thatand return an accurate count.This is easily visible as a wrong reltuples value for a partial GiSTindex following VACUUM, so back-patch to all supported branches.Andrey Borodin, reviewed by Michail NikolaevDiscussion:https://postgr.es/m/151956654251.6915.675951950408204404.pgcf@coridan.postgresql.org1 parent2b2c5aa commitccd6504
1 file changed
+9
-10
lines changedLines changed: 9 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
| 35 | + | |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
40 | 41 |
| |
41 | 42 |
| |
42 | 43 |
| |
43 |
| - | |
44 | 44 |
| |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 |
| - | |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 | 45 |
| |
55 | 46 |
| |
56 | 47 |
| |
| |||
65 | 56 |
| |
66 | 57 |
| |
67 | 58 |
| |
| 59 | + | |
68 | 60 |
| |
69 | 61 |
| |
70 | 62 |
| |
| |||
82 | 74 |
| |
83 | 75 |
| |
84 | 76 |
| |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
85 | 82 |
| |
86 | 83 |
| |
87 | 84 |
| |
| |||
95 | 92 |
| |
96 | 93 |
| |
97 | 94 |
| |
| 95 | + | |
| 96 | + | |
98 | 97 |
| |
99 | 98 |
| |
100 | 99 |
| |
|
0 commit comments
Comments
(0)