forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4feba03
committed
Rework handling of pending data for backend statistics
9aea73f has added support for backend statistics, relying onPgStat_EntryRef->pending for its data pending for flush. This designlacks in flexibility, because the pending list does some memoryallocation, making it unsuitable if incrementing counters in criticalsections.Pending data of backend statistics is reworked so the implementationdoes not depend on PgStat_EntryRef->pending anymore, relying on a staticarea of memory to store the counters that are flushed when stats arereported to the pgstats dshash. An advantage of this approach is toallow the pending data to be manipulated in critical sections; somepatches are under discussion and require that.The pending data is tracked by PendingBackendStats, local topgstat_backend.c. Two routines are introduced to allow IO statistics toupdate the backend-side counters. have_static_pending_cb andflush_static_cb are used for the flush, instead of flush_pending_cb.Author: Bertrand Drouvot, Michael PaquierDiscussion:https://postgr.es/m/66efowskppsns35v5u2m7k4sdnl7yoz5bo64tdjwq7r5lhplrz@y7dme5xwh2r51 parent28de66c commit4feba03
File tree
6 files changed
+116
-73
lines changed- src
- backend/utils/activity
- include
- utils
6 files changed
+116
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | 373 | | |
375 | | - | |
| 374 | + | |
| 375 | + | |
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
27 | 70 | | |
28 | 71 | | |
29 | 72 | | |
| |||
46 | 89 | | |
47 | 90 | | |
48 | 91 | | |
49 | | - | |
50 | 92 | | |
51 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
52 | 103 | | |
53 | 104 | | |
54 | | - | |
55 | 105 | | |
56 | | - | |
| 106 | + | |
57 | 107 | | |
58 | 108 | | |
59 | 109 | | |
| |||
64 | 114 | | |
65 | 115 | | |
66 | 116 | | |
67 | | - | |
| 117 | + | |
68 | 118 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 119 | + | |
| 120 | + | |
72 | 121 | | |
73 | 122 | | |
74 | 123 | | |
75 | 124 | | |
76 | 125 | | |
77 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
78 | 132 | | |
79 | 133 | | |
80 | 134 | | |
81 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
82 | 139 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 140 | + | |
| 141 | + | |
86 | 142 | | |
| 143 | + | |
| 144 | + | |
87 | 145 | | |
88 | 146 | | |
89 | 147 | | |
90 | | - | |
| 148 | + | |
| 149 | + | |
91 | 150 | | |
92 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
93 | 157 | | |
94 | 158 | | |
95 | 159 | | |
96 | 160 | | |
97 | 161 | | |
98 | 162 | | |
99 | | - | |
| 163 | + | |
100 | 164 | | |
101 | 165 | | |
102 | 166 | | |
103 | | - | |
104 | | - | |
105 | | - | |
| 167 | + | |
106 | 168 | | |
107 | 169 | | |
108 | | - | |
| 170 | + | |
109 | 171 | | |
110 | | - | |
| 172 | + | |
| 173 | + | |
111 | 174 | | |
112 | 175 | | |
113 | 176 | | |
114 | | - | |
| 177 | + | |
115 | 178 | | |
116 | | - | |
| 179 | + | |
117 | 180 | | |
118 | | - | |
119 | | - | |
| 181 | + | |
| 182 | + | |
120 | 183 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 184 | + | |
129 | 185 | | |
130 | 186 | | |
131 | 187 | | |
| |||
137 | 193 | | |
138 | 194 | | |
139 | 195 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 196 | + | |
| 197 | + | |
143 | 198 | | |
144 | 199 | | |
145 | 200 | | |
146 | 201 | | |
147 | 202 | | |
148 | 203 | | |
149 | 204 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 205 | + | |
162 | 206 | | |
163 | | - | |
| 207 | + | |
164 | 208 | | |
165 | 209 | | |
166 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
| |||
145 | 139 | | |
146 | 140 | | |
147 | 141 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
156 | 145 | | |
157 | 146 | | |
158 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
| 354 | + | |
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
543 | 552 | | |
544 | 553 | | |
545 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
631 | 632 | | |
632 | 633 | | |
633 | 634 | | |
| |||
0 commit comments
Comments
(0)