Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<<postmaster_pid>>)?

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Should we improve "PID XXXX is not a PostgreSQL server process" warning for pg_terminate_backend(<<postmaster_pid>>)?
Date: 2021-03-17 09:14:21
Message-ID: CALj2ACXv-pPVk8rH5yKsEKy28+iLGpMNY3uxoczu5j=K=9hK+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 17, 2021 at 8:05 AM torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> wrote:
> > I have not gone through that thread though. Is there any way we can
> > detect those child processes(stats collector, sys logger) that are
> > forked by the postmaster from a backend process? Thoughts?
>
> I couldn't find good ways to do that, and thus I'm now wondering
> just changing the message.

Changed the message.

> >> I'm now wondering if changing the message to something like
> >> "PID XXXX is not a PostgreSQL backend process".
> >>
> >> "backend process' is now defined as "Process of an instance
> >> which acts on behalf of a client session and handles its
> >> requests." in Appendix.
> >
> > Yeah, that looks good to me. IIUC, we can just change the message from
> > "PID XXXX is not a PostgreSQL server process" to "PID XXXX is not a
> > PostgreSQL backend process" and we don't need look for AuxiliaryProcs
> > or PostmasterPid.
>
> Changing log messages can affect operations, especially when people
> monitor the log message strings, but improving "PID XXXX is not a
> PostgreSQL server process" does not seem to cause such problems.

Now the error message clearly says that the given pid not a backend
process. Attaching v2 patch. Please have a look.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v2-0001-Improve-PID-XXXX-is-not-a-PostgreSQL-server-proce.patch application/octet-stream 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2021-03-17 09:17:01 Re: pgsql: Add libpq pipeline mode support to pgbench
Previous Message Vik Fearing 2021-03-17 09:10:09 Re: Code comment fix