public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ryo Matsumura (Fujitsu) <[email protected]>
To: [email protected] <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Concerns regarding code in pgstat_backend.c
Date: Fri, 6 Feb 2026 07:11:07 +0000
Message-ID: <TYCPR01MB11316AD8150C8F470319ACCAEE866A@TYCPR01MB11316.jpnprd01.prod.outlook.com> (raw)

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
https://www.postgresql.org/message-id/flat/66efowskppsns35v5u2m7k4sdnl7yoz5bo64tdjwq7r5lhplrz%40y7dm...

Best Regards
Ryo Matsumura


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Concerns regarding code in pgstat_backend.c
  In-Reply-To: <TYCPR01MB11316AD8150C8F470319ACCAEE866A@TYCPR01MB11316.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox