Re: Get memory contexts of an arbitrary backend process
От
torikoshia
Тема
Re: Get memory contexts of an arbitrary backend process
Дата
Msg-id
fd78be66959cbf3957a329bb069ab737@oss.nttdata.com
Ответ на
Re: Get memory contexts of an arbitrary backend process (Kyotaro Horiguchi)
Список
Дерево обсуждения
Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Andres Freund <andres@anarazel.de>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process Pavel Stehule <pavel.stehule@gmail.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process Tom Lane <tgl@sss.pgh.pa.us>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process Michael Paquier <michael@paquier.xyz>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Georgios Kokolatos <gkokolatos@protonmail.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Fujii Masao <masao.fujii@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Tom Lane <tgl@sss.pgh.pa.us>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
Re: Get memory contexts of an arbitrary backend process torikoshia <torikoshia@oss.nttdata.com>
On 2021-03-26 14:08, Kyotaro Horiguchi wrote: > At Fri, 26 Mar 2021 14:02:49 +0900, Fujii Masao > wrote in >> >> >> On 2021/03/26 13:28, Kyotaro Horiguchi wrote: >> >> "some contexts are omitted" >> >> "n child contexts: total_bytes = ..." >> > Sorry I missed that is already implemented. So my opnion is I agree >> > with limiting with a fixed-number, and preferablly sorted in >> > descending order of... totalspace/nblocks? >> >> This may be an improvement, but makes us modify >> MemoryContextStatsInternal() >> very much. I'm afraid that it's too late to do that at this stage... >> What about leaving the output order as it is at the first version? > > So I said "preferably":p (with a misspelling...) > I'm fine with that. > > regards. Thanks for the comments! Attached a new patch. It adds pg_log_backend_memory_contexts(pid) which logs memory contexts of the specified backend process. The number of child contexts to be logged per parent is limited to 100 as with MemoryContextStats(). As written in commit 7b5ef8f2d07, which limits the verbosity of memory context statistics dumps, it supposes that 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. Thoughts? Regards.
В списке pgsql-hackers по дате отправления
От: David Rowley
Дата:
От: Zhihong Yu
Дата: