Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c1973f

Browse files
committed
Avoid recursion in MemoryContext functions
You might run out of stack space with recursion, which is not nice infunctions that might be used e.g. at cleanup after transactionabort. MemoryContext contains pointer to parent and siblings, so wecan traverse a tree of contexts iteratively, without usingstack. Refactor the functions to do that.MemoryContextStats() still recurses, but it now has a limit to howdeep it recurses. Once the limit is reached, it prints just a summaryof the rest of the hierarchy, similar to how it summarizes contextswith lots of children. That seems good anyway, because a context dumpwith hundreds of nested contexts isn't very readable.Report by Egor Chindyaskin and Alexander Lakhin.Discussion:https://postgr.es/m/1672760457.940462079%40f306.i.mail.ruAuthor: Heikki LinnakangasReviewed-by: Robert Haas, Andres Freund, Alexander Korotkov, Tom Lane
1 parent6f38c43 commit4c1973f

File tree

2 files changed

+190
-82
lines changed

2 files changed

+190
-82
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp