pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add pg_backend_memory_contexts system view.
Date: Wed, 19 Aug 2020 06:35:49 +0000
Message-ID: <E1k8HhN-0006YT-Rd@gemulon.postgresql.org> (raw)

Add pg_backend_memory_contexts system view.

This view displays the usages of all the memory contexts of the server
process attached to the current session. This information is useful to
investigate the cause of backend-local memory bloat.

This information can be also collected by calling
MemoryContextStats(TopMemoryContext) via a debugger. But this technique
cannot be uesd in some environments because no debugger is available there.
And it outputs lots of text messages and it's not easy to analyze them.
So, pg_backend_memory_contexts view allows us to access to backend-local
memory contexts information more easily.

Bump catalog version.

Author: Atsushi Torikoshi, Fujii Masao
Reviewed-by: Tatsuhito Kasahara, Andres Freund, Daniel Gustafsson, Robert Haas, Michael Paquier
Discussion: https://postgr.es/m/72a656e0f71d0860161e0b3f67e4d771@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e98c0bafb28de87ae095b341687dc082371af54

Modified Files
--------------
doc/src/sgml/catalogs.sgml           | 122 +++++++++++++++++++++++++++++++
src/backend/catalog/system_views.sql |   3 +
src/backend/utils/mmgr/mcxt.c        | 138 +++++++++++++++++++++++++++++++++++
src/include/catalog/catversion.h     |   2 +-
src/include/catalog/pg_proc.dat      |   9 +++
src/test/regress/expected/rules.out  |  10 +++
6 files changed, 283 insertions(+), 1 deletion(-)



Message-ID: <E1k8HhN-0006YT-Rd@gemulon.postgresql.org>
Permalink:  ../E1k8HhN-0006YT-Rd@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1k8HhN-0006YT-Rd@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: Add pg_backend_memory_contexts system view.
  In-Reply-To: <E1k8HhN-0006YT-Rd@gemulon.postgresql.org>
  References: <E1k8HhN-0006YT-Rd@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox