forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita7ef273
committed
Fix calculation of maximum statistics-message size.
The PGSTAT_NUM_TABENTRIES macro should have been updated when new fieldswere added to struct PgStat_MsgTabstat in commit6448289, but it wasn't.Fix that.Also, add a static assertion that we didn't overrun the intended size limiton stats messages. This will not necessarily catch every mistake incomputing the maximum array size for stats messages, but it will catch onesthat have practical consequences. (The assertion in fact doesn't complainabout the aforementioned error in PGSTAT_NUM_TABENTRIES, because that wasnot big enough to cause the array length to increase.)No back-patch, as there's no actual bug in existing releases; this is justin the nature of future-proofing.Mark Dilger and Tom Lane1 parent638cf09 commita7ef273
2 files changed
+16
-4
lines changedLines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
332 | 342 |
| |
333 | 343 |
| |
334 | 344 |
| |
|
Lines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
177 | 177 |
| |
178 | 178 |
| |
179 | 179 |
| |
180 |
| - | |
181 |
| - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
182 | 183 |
| |
183 | 184 |
| |
184 |
| - | |
| 185 | + | |
| 186 | + | |
185 | 187 |
| |
186 | 188 |
| |
187 | 189 |
| |
| |||
225 | 227 |
| |
226 | 228 |
| |
227 | 229 |
| |
228 |
| - | |
| 230 | + | |
229 | 231 |
| |
230 | 232 |
| |
231 | 233 |
| |
|
0 commit comments
Comments
(0)