Add pg_backend_memory_contexts system view.
authorFujii Masao <fujii@postgresql.org>
Wed, 19 Aug 2020 06:34:43 +0000 (15:34 +0900)
committerFujii Masao <fujii@postgresql.org>
Wed, 19 Aug 2020 06:34:43 +0000 (15:34 +0900)
commit3e98c0bafb28de87ae095b341687dc082371af54
tree1cdcd172f45c2e5814c8dad2495931b6df5f14ae
parent07f32fcd23ac81898ed47f88beb569c631a2f223
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
doc/src/sgml/catalogs.sgml
src/backend/catalog/system_views.sql
src/backend/utils/mmgr/mcxt.c
src/include/catalog/catversion.h
src/include/catalog/pg_proc.dat
src/test/regress/expected/rules.out