Commit ce95c54
committed
Fix pg_statio_all_tables view for multiple TOAST indexes.
A TOAST table can normally have only one index, but there are corner
cases where it has more; for example, transiently during REINDEX
CONCURRENTLY. In such a case, the pg_statio_all_tables view produced
multiple rows for the owning table, one per TOAST index. Refactor the
view to avoid that, instead summing the stats across all the indexes,
as we do for regular table indexes.
While this has been wrong for a long time, back-patching seems unwise
due to the difficulty of putting a system view change into back
branches.
Andrei Zubkov, tweaked a bit by me
Discussion: https://postgr.es/m/acefef4189706971fc475f912c1afdab1c48d627.camel@moonset.ru1 parent 7dac614 commit ce95c54
File tree
3 files changed
+34
-20
lines changed- src
- backend/catalog
- include/catalog
- test/regress/expected
3 files changed
+34
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
730 | | - | |
731 | | - | |
732 | | - | |
| 730 | + | |
| 731 | + | |
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
737 | | - | |
738 | | - | |
| 735 | + | |
| 736 | + | |
739 | 737 | | |
740 | | - | |
741 | | - | |
742 | | - | |
| 738 | + | |
743 | 739 | | |
744 | | - | |
745 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
746 | 755 | | |
747 | 756 | | |
748 | 757 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2269 | 2269 | | |
2270 | 2270 | | |
2271 | 2271 | | |
2272 | | - | |
2273 | | - | |
| 2272 | + | |
| 2273 | + | |
2274 | 2274 | | |
2275 | 2275 | | |
2276 | | - | |
2277 | | - | |
| 2276 | + | |
| 2277 | + | |
2278 | 2278 | | |
2279 | | - | |
2280 | 2279 | | |
2281 | | - | |
2282 | 2280 | | |
2283 | | - | |
2284 | | - | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
| 2289 | + | |
2285 | 2290 | | |
2286 | 2291 | | |
2287 | 2292 | | |
| |||
0 commit comments