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

Appearance settings

Commit 7fa945b

Browse filesBrowse files
committed
Improve warning message in pg_signal_backend()
Previously, invoking pg_terminate_backend() or pg_cancel_backend() with the postmaster PID produced a "PID XXXX is not a PostgresSQL server process" warning, which does not make sense. Change to "backend process" to make the message more exact. Nathan Bossart, based on an idea from Bharath Rupireddy with input from Tom Lane and Euler Taveira Discussion: https://www.postgresql.org/message-id/flat/CALj2ACW7Rr-R7mBcBQiXWPp=JV5chajjTdudLiF5YcpW-BmHhg@mail.gmail.com
1 parent 9cb5518 commit 7fa945b
Copy full SHA for 7fa945b

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎src/backend/storage/ipc/signalfuncs.c

Copy file name to clipboardExpand all lines: src/backend/storage/ipc/signalfuncs.c
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ pg_signal_backend(int pid, int sig)
5757
* arbitrary process to prevent that. But since so far all the callers of
5858
* this mechanism involve some request for ending the process anyway, that
5959
* it might end on its own first is not a problem.
60+
*
61+
* Note that proc will also be NULL if the pid refers to an auxiliary
62+
* process or the postmaster (neither of which can be signaled via
63+
* pg_signal_backend()).
6064
*/
6165
if (proc == NULL)
6266
{
@@ -65,7 +69,8 @@ pg_signal_backend(int pid, int sig)
6569
* if one backend terminated on its own during the run.
6670
*/
6771
ereport(WARNING,
68-
(errmsg("PID %d is not a PostgreSQL server process", pid)));
72+
(errmsg("PID %d is not a PostgreSQL backend process", pid)));
73+
6974
return SIGNAL_BACKEND_ERROR;
7075
}
7176

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.