Re: Fix pg_stat_get_backend_wait_event() for aux processes

From: Rahila Syed <rahilasyed90(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix pg_stat_get_backend_wait_event() for aux processes
Date: 2026-02-05 11:15:39
Message-ID: CAH2L28vyF9umHPGpZtFWx5uThK0FMwSAR4w7+-EJhHbtPG_xzg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

>
> Another thing I didn't do in this patch yet: I feel we should replace
> BackendPidGetProc() with a function like "PGPROC *PidGetPGProc(pid_t)",
> that would work for backends and aux processes alike. It's a common
> pattern to call BackendPidGetProc() followed by AuxiliaryPidGetProc()
> currently. Even for the callers that specifically want to only check
> backend processes, I think it would be more natural to call
> PidGetPGProc(), and then check the process type.
>
>
+1 for the idea, do you also intend to remove AuxiliaryPidGetProc() as
part of this change, given that all the occurrences of it are coupled with
BackendPidGetProc() ?

Thank you,
Rahila Syed

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-02-05 11:53:22 Re: Truncate logs by max_log_size
Previous Message Michael Paquier 2026-02-05 10:28:00 Re: Small fixes for incorrect error messages