Concerns regarding code in pgstat_backend.c

Started by Ryo Matsumura (Fujitsu)6 months ago1 messageshackers
Jump to latest
#1Ryo Matsumura (Fujitsu)
matsumura.ryo@fujitsu.com

Hi, Michael and Hackers,

I found the code that is likely to cause bugs in the future. It's not currently a bug.
Should I have misunderstood, please feel free to disregard this email.

pgstat_create_backend(ProcNumber procnum) uses MyProcNumber instead of the argument.
I've had a quick look through the commit log and thread, but I don't seem to have found the reason.
Wouldn't it be better to use 'procnum'?

This change seems to have appeared in v2-0002-More-work-to-allow-backend-statistics-in-critical.patch on 2025-01-20 06:34:41
/messages/by-id/66efowskppsns35v5u2m7k4sdnl7yoz5bo64tdjwq7r5lhplrz@y7dme5xwh2r5

Best Regards
Ryo Matsumura