Re: Fix pg_stat_get_backend_wait_event() for aux processes - Mailing list pgsql-hackers

From Rahila Syed
Subject Re: Fix pg_stat_get_backend_wait_event() for aux processes
Date
Msg-id CAH2L28vyF9umHPGpZtFWx5uThK0FMwSAR4w7+-EJhHbtPG_xzg@mail.gmail.com
Whole thread Raw
In response to Fix pg_stat_get_backend_wait_event() for aux processes  (Heikki Linnakangas <hlinnaka@iki.fi>)
List 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

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Small fixes for incorrect error messages
Next
From: Jim Jones
Date:
Subject: Re: Truncate logs by max_log_size