- Notifications
You must be signed in to change notification settings - Fork5
Commit115f414
committed
Fix VACUUM's reporting of dead-tuple counts to the stats collector.
Historically, VACUUM has just reported its new_rel_tuples estimate(the same thing it puts into pg_class.reltuples) to the stats collector.That number counts both live and dead-but-not-yet-reclaimable tuples.This behavior may once have been right, but modern versions of thepgstats code track live and dead tuple counts separately, so puttingthe total into n_live_tuples and zero into n_dead_tuples is surelypretty bogus. Fix it to report live and dead tuple counts separately.This doesn't really do much for situations where updating transactionscommit concurrently with a VACUUM scan (possibly causing double-counting oromission of the tuples they add or delete); but it's clearly an improvementover what we were doing before.Hari Babu, reviewed by Amit Kapila1 parent76e91b3 commit115f414
File tree
3 files changed
+20
-9
lines changed- src
- backend
- commands
- postmaster
- include
3 files changed
+20
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
310 | 316 | | |
311 | 317 | | |
312 | | - | |
| 318 | + | |
| 319 | + | |
313 | 320 | | |
314 | 321 | | |
315 | 322 | | |
| |||
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
337 | | - | |
| 344 | + | |
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| |||
346 | 353 | | |
347 | 354 | | |
348 | 355 | | |
| 356 | + | |
349 | 357 | | |
350 | 358 | | |
351 | 359 | | |
| |||
1036 | 1044 | | |
1037 | 1045 | | |
1038 | 1046 | | |
| 1047 | + | |
1039 | 1048 | | |
1040 | 1049 | | |
1041 | 1050 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1327 | 1327 | | |
1328 | 1328 | | |
1329 | 1329 | | |
1330 | | - | |
| 1330 | + | |
| 1331 | + | |
1331 | 1332 | | |
1332 | 1333 | | |
1333 | 1334 | | |
| |||
1339 | 1340 | | |
1340 | 1341 | | |
1341 | 1342 | | |
1342 | | - | |
| 1343 | + | |
| 1344 | + | |
1343 | 1345 | | |
1344 | 1346 | | |
1345 | 1347 | | |
| |||
4809 | 4811 | | |
4810 | 4812 | | |
4811 | 4813 | | |
4812 | | - | |
4813 | | - | |
4814 | | - | |
| 4814 | + | |
| 4815 | + | |
4815 | 4816 | | |
4816 | 4817 | | |
4817 | 4818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
775 | 776 | | |
776 | 777 | | |
777 | 778 | | |
778 | | - | |
| 779 | + | |
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
| |||
0 commit comments
Comments
(0)