From cc5c6f68ca4622d7e4fd294924a99ea866b31833 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Wed, 9 Mar 2022 08:54:06 -0600 Subject: [PATCH 2/2] f!minor fixen --- doc/src/sgml/func.sgml | 6 +++--- src/backend/postmaster/pgarch.c | 2 +- src/backend/storage/ipc/procarray.c | 6 +++--- src/backend/storage/ipc/signalfuncs.c | 10 +++++----- src/backend/utils/adt/mcxtfuncs.c | 8 ++++---- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 9f321fb019a..b33e69181e9 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -25366,8 +25366,8 @@ SELECT collation for ('foo' COLLATE "de_DE"); Requests to log the backtrace of the backend with the specified process ID. This function can send the request to - backends and auxiliary processes except logger and statistics - collector. These backtraces will be logged at LOG + backends and auxiliary processes except the logger and statistics + collector. The backtraces will be logged at LOG message level. They will appear in the server log based on the log configuration set (See for more information), but will not be sent to the client regardless of @@ -25631,7 +25631,7 @@ For example: /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2107bbd505] postgres: postgresdba postgres [local] SELECT() [0x4842a9] - You can get the file name and line number from the logged details by using + You can obtain the file name and line number from the logged details by using gdb/addr2line in linux platforms (users must ensure gdb/addr2line is already installed). diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 0726072e327..af55e39cc15 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -766,7 +766,7 @@ pgarch_die(int code, Datum arg) * * This is called in the loops pgarch_MainLoop and pgarch_ArchiverCopyLoop. * It checks for barrier events, config update, request for logging of - * memory contexts and backtrace, but not shutdown request because how to + * memory contexts and backtraces, but not shutdown request because how to * handle shutdown request is different between those loops. */ static void diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index d5b75e0db4d..3ad7dd4a782 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -3186,7 +3186,7 @@ CheckPostgresProcessId(int pid, bool chk_auxiliary_proc, BackendId *backendId) * to acquire a lock on an arbitrary process to prevent that. But since * this mechanism is usually used to debug a backend or an auxiliary * process running and consuming lots of memory, that it might end on its - * own first and its memory contexts are not logged is not a problem. + * own first without logging the requested info is not a problem. */ if (result == NULL) { @@ -3196,10 +3196,10 @@ CheckPostgresProcessId(int pid, bool chk_auxiliary_proc, BackendId *backendId) */ if (chk_auxiliary_proc) ereport(WARNING, - (errmsg("PID %d is not a PostgreSQL server process", pid))); + errmsg("PID %d is not a PostgreSQL server process", pid)); else ereport(WARNING, - (errmsg("PID %d is not a PostgreSQL backend process", pid))); + errmsg("PID %d is not a PostgreSQL backend process", pid)); } return result; diff --git a/src/backend/storage/ipc/signalfuncs.c b/src/backend/storage/ipc/signalfuncs.c index 16d39467ea0..727158098e3 100644 --- a/src/backend/storage/ipc/signalfuncs.c +++ b/src/backend/storage/ipc/signalfuncs.c @@ -290,9 +290,9 @@ pg_rotate_logfile_v2(PG_FUNCTION_ARGS) * Signal a backend or an auxiliary process to log its backtrace. * * By default, only superusers are allowed to signal to log the backtrace - * because allowing any users to issue this request at an unbounded - * rate would cause lots of log messages and which can lead to denial of - * service. Additional roles can be permitted with GRANT. + * because allowing any user to issue this request at an unbounded + * rate would cause lots of log messages which can lead to denial of service. + * Additional roles can be permitted with GRANT. * * On receipt of this signal, a backend or an auxiliary process sets the flag * in the signal handler, which causes the next CHECK_FOR_INTERRUPTS() @@ -311,7 +311,7 @@ pg_log_backtrace(PG_FUNCTION_ARGS) PG_RETURN_BOOL(false); #endif - /* Get the process id of the backend or an auxiliary process */ + /* Get the process id of the backend or auxiliary process */ if (!CheckPostgresProcessId(pid, true, &backendId)) PG_RETURN_BOOL(false); @@ -324,7 +324,7 @@ pg_log_backtrace(PG_FUNCTION_ARGS) if (SendProcSignal(pid, PROCSIG_LOG_BACKTRACE, backendId)) { ereport(WARNING, - (errmsg("could not send signal to process %d: %m", pid))); + errmsg("could not send signal to process %d: %m", pid)); PG_RETURN_BOOL(false); } diff --git a/src/backend/utils/adt/mcxtfuncs.c b/src/backend/utils/adt/mcxtfuncs.c index b8d70a37313..f338781695d 100644 --- a/src/backend/utils/adt/mcxtfuncs.c +++ b/src/backend/utils/adt/mcxtfuncs.c @@ -133,9 +133,9 @@ pg_get_backend_memory_contexts(PG_FUNCTION_ARGS) * Signal a backend or an auxiliary process to log its memory contexts. * * By default, only superusers are allowed to signal to log the memory - * contexts because allowing any users to issue this request at an unbounded - * rate would cause lots of log messages and which can lead to denial of - * service. Additional roles can be permitted with GRANT. + * contexts because allowing any user to issue this request at an unbounded + * rate would cause lots of log messages which can lead to denial of service. + * Additional roles can be permitted with GRANT. * * On receipt of this signal, a backend or an auxiliary process sets the flag * in the signal handler, which causes the next CHECK_FOR_INTERRUPTS() @@ -147,7 +147,7 @@ pg_log_backend_memory_contexts(PG_FUNCTION_ARGS) int pid = PG_GETARG_INT32(0); BackendId backendId = InvalidBackendId; - /* Get the process id of the backend or an auxiliary process */ + /* Get the process id of the backend or auxiliary process */ if (!CheckPostgresProcessId(pid, true, &backendId)) PG_RETURN_BOOL(false); -- 2.17.1