1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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
This commit is contained in:
Fujii Masao
2022-01-11 23:19:59 +09:00
parent 85c61ba892
commit 790fbda902
9 changed files with 65 additions and 15 deletions

View File

@ -25421,7 +25421,9 @@ SELECT collation for ('foo' COLLATE "de_DE");
</para>
<para>
Requests to log the memory contexts of the backend with the
specified process ID. These memory contexts will be logged at
specified process ID. This function can send the request to
backends and auxiliary processes except logger and statistics
collector. These memory contexts will be logged at
<literal>LOG</literal> message level. They will appear in
the server log based on the log configuration set
(See <xref linkend="runtime-config-logging"/> for more information),