+ * 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)