forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7b5ef8f
committed
Limit the verbosity of memory context statistics dumps.
We had a report from Stefan Kaltenbrunner of a case in which postmasterlog files overran available disk space because multiple backends spewedenormous context stats dumps upon hitting an out-of-memory condition.Given the lack of similar reports, this isn't a common problem, but itstill seems worth doing something about. However, we don't want to justblindly truncate the output, because that might prevent diagnosis of OOMproblems. What seems like a workable compromise is to limit the dump to100 child contexts per parent, and summarize the space used within anyadditional child contexts. That should help because practical cases wherethe dump gets long will typically be huge numbers of siblings under thesame parent context; while the additional debugging value from seeingdetails about individual siblings beyond 100 will not be large, we hope.Anyway it doesn't take much code or memory space to do this, so let's tryit like this and see how things go.Since the summarization mechanism requires passing totals back up anyway,I took the opportunity to add a "grand total" line to the end of theprintout.1 parente39c4af commit7b5ef8f
File tree
4 files changed
+142
-21
lines changed- src
- backend/utils/mmgr
- include
- nodes
- utils
4 files changed
+142
-21
lines changedLines changed: 30 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
253 | 253 |
| |
254 | 254 |
| |
255 | 255 |
| |
256 |
| - | |
| 256 | + | |
| 257 | + | |
257 | 258 |
| |
258 | 259 |
| |
259 | 260 |
| |
| |||
1228 | 1229 |
| |
1229 | 1230 |
| |
1230 | 1231 |
| |
1231 |
| - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1232 | 1237 |
| |
1233 | 1238 |
| |
1234 |
| - | |
| 1239 | + | |
| 1240 | + | |
1235 | 1241 |
| |
1236 | 1242 |
| |
1237 | 1243 |
| |
1238 |
| - | |
| 1244 | + | |
1239 | 1245 |
| |
1240 | 1246 |
| |
1241 | 1247 |
| |
1242 |
| - | |
1243 | 1248 |
| |
1244 |
| - | |
1245 | 1249 |
| |
1246 | 1250 |
| |
1247 | 1251 |
| |
| |||
1251 | 1255 |
| |
1252 | 1256 |
| |
1253 | 1257 |
| |
| 1258 | + | |
| 1259 | + | |
1254 | 1260 |
| |
1255 | 1261 |
| |
1256 | 1262 |
| |
1257 |
| - | |
| 1263 | + | |
1258 | 1264 |
| |
1259 | 1265 |
| |
1260 | 1266 |
| |
1261 | 1267 |
| |
1262 |
| - | |
1263 |
| - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
1264 | 1271 |
| |
1265 |
| - | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
1266 | 1275 |
| |
1267 |
| - | |
1268 |
| - | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
1269 | 1287 |
| |
1270 | 1288 |
| |
1271 | 1289 |
| |
|
Lines changed: 91 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
56 | 58 |
| |
57 | 59 |
| |
58 | 60 |
| |
| |||
477 | 479 |
| |
478 | 480 |
| |
479 | 481 |
| |
480 |
| - | |
481 |
| - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
482 | 485 |
| |
483 | 486 |
| |
484 | 487 |
| |
485 | 488 |
| |
486 |
| - | |
| 489 | + | |
| 490 | + | |
487 | 491 |
| |
488 | 492 |
| |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
489 | 521 |
| |
490 |
| - | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
491 | 525 |
| |
| 526 | + | |
492 | 527 |
| |
| 528 | + | |
493 | 529 |
| |
494 | 530 |
| |
495 | 531 |
| |
496 |
| - | |
497 |
| - | |
498 |
| - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
499 | 582 |
| |
500 | 583 |
| |
501 | 584 |
| |
|
Lines changed: 20 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
19 | 37 |
| |
20 | 38 |
| |
21 | 39 |
| |
| |||
44 | 62 |
| |
45 | 63 |
| |
46 | 64 |
| |
47 |
| - | |
| 65 | + | |
| 66 | + | |
48 | 67 |
| |
49 | 68 |
| |
50 | 69 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
| 107 | + | |
107 | 108 |
| |
108 | 109 |
| |
109 | 110 |
| |
|
0 commit comments
Comments
(0)