Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit108505d

Browse files
committed
Prevent memory context logging from sending log message to connected client.
When pg_log_backend_memory_contexts() is executed, the target backendshould use LOG_SERVER_ONLY to log its memory contexts, to prevent themfrom 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 withLOG_SERVER_ONLY.Back-patch to v14 where pg_log_backend_memory_contexts() was added.Author: Fujii MasaoReviewed-by: Bharath Rupireddy, Atsushi TorikoshiDiscussion:https://postgr.es/m/82c12f36-86f7-5e72-79af-7f5c37f6cad7@oss.nttdata.com
1 parent7340ace commit108505d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/backend/utils/mmgr/mcxt.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,8 +1042,14 @@ ProcessLogMemoryContextInterrupt(void)
10421042
{
10431043
LogMemoryContextPending= false;
10441044

1045-
ereport(LOG,
1046-
(errmsg("logging memory contexts of PID %d",MyProcPid)));
1045+
/*
1046+
* Use LOG_SERVER_ONLY to prevent this message from being sent to the
1047+
* connected client.
1048+
*/
1049+
ereport(LOG_SERVER_ONLY,
1050+
(errhidestmt(true),
1051+
errhidecontext(true),
1052+
errmsg("logging memory contexts of PID %d",MyProcPid)));
10471053

10481054
/*
10491055
* When a backend process is consuming huge memory, logging all its memory

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp