git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: e39c4af) | patch
Limit the verbosity of memory context statistics dumps.
2015年8月25日 17:09:48 +0000 (13:09 -0400)
2015年8月25日 17:09:48 +0000 (13:09 -0400)
commit 7b5ef8f2d070c075811ec04a0fcb745d67c7fe3f
Limit the verbosity of memory context statistics dumps.

We had a report from Stefan Kaltenbrunner of a case in which postmaster
log files overran available disk space because multiple backends spewed
enormous context stats dumps upon hitting an out-of-memory condition.
Given the lack of similar reports, this isn't a common problem, but it
still seems worth doing something about. However, we don't want to just
blindly truncate the output, because that might prevent diagnosis of OOM
problems. What seems like a workable compromise is to limit the dump to
100 child contexts per parent, and summarize the space used within any
additional child contexts. That should help because practical cases where
the dump gets long will typically be huge numbers of siblings under the
same parent context; while the additional debugging value from seeing
details 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 try
it 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 the
printout.
src/backend/utils/mmgr/aset.c diff | blob | blame | history
src/backend/utils/mmgr/mcxt.c diff | blob | blame | history
src/include/nodes/memnodes.h diff | blob | blame | history
src/include/utils/memutils.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /