Re: Backend memory dump analysis
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2018-03-26T22:12:09Z
Lists: pgsql-hackers
Vladimir Sitnikov <sitnikov.vladimir@gmail.com> writes: > It takes just a single pass to compute "total" (and it takes no memory), so > it would be much better if "TopMemoryContext: ..." was replaced with > "Total memory used by all contexts is XXX bytes" > Current TopMemoryContext row is extremely misleading. This may or may not be a good thing to do, but in any case it's well outside the scope of this patch, whose ambition is only to get additional identification info attached to contexts for which that's useful. Moreover, seeing how late we are in the v11 cycle, it's hard to justify doing more; that smells like a new feature and the time for that is past for this year. The only reason I'm considering this patch now at all is that it rethinks some API changes we made earlier in v11, and it'd be nice to avoid an additional round of churn there in v12. > PS. SQL text might involve sensitive information (e.g. logins, passwords, > personal IDs), so there might be security issues with printing SQL by > default. Indeed, that's something that extensions would need to think about. I do not believe it's an issue for MemoryContextStats though; the postmaster log can already contain sensitive data. regards, tom lane
Commits
-
Add memory context identifier to portal context
- 94c1f9ba11d1 11.0 landed
-
Rename MemoryContextCopySetIdentifier() for clarity
- bbca77623fb5 11.0 landed
-
Allow memory contexts to have both fixed and variable ident strings.
- 442accc3fe0c 11.0 landed
-
Rethink MemoryContext creation to improve performance.
- 9fa6f00b1308 11.0 cited