From: | Fujii Masao <fujii(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Prevent memory context logging from sending log message to conne |
Date: | 2022-01-28 02:26:23 |
Message-ID: | E1nDGxz-0006Hz-0c@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Prevent memory context logging from sending log message to connected client.
When pg_log_backend_memory_contexts() is executed, the target backend
should use LOG_SERVER_ONLY to log its memory contexts, to prevent them
from being sent to its connected client regardless of client_min_messages.
But previously the backend unexpectedly used LOG to log the message
"logging memory contexts of PID %d" and it could be sent to the client.
This is a bug in memory context logging.
To fix the bug, this commit changes that message so that it's logged with
LOG_SERVER_ONLY.
Back-patch to v14 where pg_log_backend_memory_contexts() was added.
Author: Fujii Masao
Reviewed-by: Bharath Rupireddy, Atsushi Torikoshi
Discussion: https://postgr.es/m/82c12f36-86f7-5e72-79af-7f5c37f6cad7@oss.nttdata.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/108505d763d12bc2d9d21697f57c331963aa12d1
Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Etsuro Fujita | 2022-01-28 06:56:48 | pgsql: Fix typo in comment. |
Previous Message | Fujii Masao | 2022-01-28 02:26:09 | pgsql: Prevent memory context logging from sending log message to conne |