Re: Fix pg_stat_get_backend_wait_event() for aux processes

From: Sami Imseih <samimseih(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "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 00:21:06
Message-ID: CAA5RZ0tsukWr5+ChZyX7-vssNi1TNpKpX+xAD6tQxNR+6E3W-A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 3/
>
> + * pgstat_get_backend_type_by_proc_number() -
> + *
> + * Return the type of the backend with the specified ProcNumber.
> This looks
> + * directly at the BackendStatusArray, so the return value may be
> out of date.
> + * The only current use of this function is in
> pg_signal_backend(), which is
> + * inherently racy, so we don't worry too much about this.
> + *
> + * It is the caller's responsibility to use this wisely; at
> minimum, callers
> + * should ensure that procNumber is valid and perform the
> required permissions
> + * checks.
> + * ----------
> + */
> +BackendType
> +pgstat_get_backend_type_by_proc_number(ProcNumber procNumber)
>
> +extern BackendType pgstat_get_backend_type_by_proc_number(ProcNumber
> procNumber);
>
>
> Maybe I am missing something, but I don't see
> pgstat_get_backend_type_by_proc_number
> being used.

Disregard this comment please. It looks like this was due to 084e42b after
rebasing
0001 to test.

--
Sami Imseih

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-02-05 00:33:16 Re: Make wal_receiver_timeout configurable per subscription
Previous Message David Rowley 2026-02-05 00:15:45 Re: Non-deterministic buffer counts reported in execution with EXPLAIN ANALYZE BUFFERS