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

From Tom Lane
Subject Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?
Date
Msg-id 2737170.1637177856@sss.pgh.pa.us
Whole thread Raw
In response to Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<>)?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Justin Pryzby <pryzby@telsasoft.com> writes:
> On Wed, Nov 17, 2021 at 03:59:59PM -0300, Euler Taveira wrote:
>> 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.

> It's correct to say "signalling ... is not allowed", which means the same as
> "it is not allowed to signal ...".

Yeah, the grammar is fine as far as that goes.  What reads awkwardly to me
is inclusion of "with PID %d" in the middle of the sentence.  That seems
odd, not least because it leaves the impression that maybe it would've
been okay to signal some other postmaster with a different PID.

Frankly, I think the existing wording is fine and this patch adds
complication without making any useful improvement.  We could maybe change
"is not a PostgresSQL server process" to "is not a PostgresSQL backend
process", but I wouldn't go further than that.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Deficient error handling in pg_dump and pg_basebackup
Next
From: Jaime Casanova
Date:
Subject: pg_upgrade parallelism