Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)? - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?
Date
Msg-id 4563c535-4b52-4974-a251-2500a170d06b@www.fastmail.com
Whole thread Raw
In response to Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?
List pgsql-hackers
On Mon, Nov 15, 2021, at 4:27 AM, Bharath Rupireddy wrote:
As there is some interest shown in this thread at [1], I'm attaching a
new v3 patch here. Please review it.
I took a look at this patch. I have a few comments.

+ ereport(WARNING,
+ (errmsg("signalling postmaster with PID %d is not allowed", pid)));

I would say "signal postmaster PID 1234 is not allowed". It is not an
in-progress action.

s/shared-memory/shared memory/

syslogger and statistics collector don't have a procArray entry so you could
probably provide a new function that checks if it is an auxiliary process.
AuxiliaryPidGetProc() does not return all auxiliary processes; syslogger and
statistics collector don't have a procArray entry. You can use their PIDs
(SysLoggerPID and PgStatPID) to provide an accurate information.

+ if (proc)
+ ereport(WARNING,
+ (errmsg("signalling PostgreSQL server process with PID %d is not allowed",

I would say "signal PostgreSQL auxiliary process PID 1234 is not allowed".

+ ereport(WARNING,
+ (errmsg("PID %d is not a PostgreSQL server process", pid)));

I would say "PID 1234 is not a PostgreSQL backend process". That's the glossary
terminology.


--
Euler Taveira

pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Non-superuser subscription owners
Next
From: "Bossart, Nathan"
Date:
Subject: Re: Add planner support function for starts_with()