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: Enhance pg_log_backend_memory_contexts() for auxiliary processes
Date: Tue, 11 Jan 2022 14:20:51 +0000
Message-ID: <E1n7I15-0001sB-FH@gemulon.postgresql.org> (raw)

Enhance pg_log_backend_memory_contexts() for auxiliary processes.

Previously pg_log_backend_memory_contexts() could request to
log the memory contexts of backends, but not of auxiliary processes
such as checkpointer. This commit enhances the function so that
it can also send the request to auxiliary processes. It's useful to
look at the memory contexts of those processes for debugging purpose
and better understanding of the memory usage pattern of them.

Note that pg_log_backend_memory_contexts() cannot send the request
to logger or statistics collector. Because this logging request
mechanism is based on shared memory but those processes aren't
connected to that.

Author: Bharath Rupireddy
Reviewed-by: Vignesh C, Kyotaro Horiguchi, Fujii Masao
Discussion: https://postgr.es/m/CALj2ACU1nBzpacOK2q=a65S_4+Oaz_rLTsU1Ri0gf7YUmnmhfQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/790fbda902093c71ae47bff1414799cd716abb80

Modified Files
--------------
doc/src/sgml/func.sgml                       |  4 ++-
src/backend/postmaster/checkpointer.c        |  4 +++
src/backend/postmaster/interrupt.c           |  5 ++++
src/backend/postmaster/pgarch.c              | 10 ++++++--
src/backend/postmaster/startup.c             |  5 ++++
src/backend/postmaster/walwriter.c           |  4 +++
src/backend/utils/adt/mcxtfuncs.c            | 38 +++++++++++++++++++---------
src/test/regress/expected/misc_functions.out |  7 +++++
src/test/regress/sql/misc_functions.sql      |  3 +++
9 files changed, 65 insertions(+), 15 deletions(-)



Message-ID: <E1n7I15-0001sB-FH@gemulon.postgresql.org>
Permalink:  ../E1n7I15-0001sB-FH@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n7I15-0001sB-FH@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: Enhance pg_log_backend_memory_contexts() for auxiliary processes
  In-Reply-To: <E1n7I15-0001sB-FH@gemulon.postgresql.org>
  References: <E1n7I15-0001sB-FH@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