Обсуждение: Avoid recalculating pgprocno in ProcArrayAdd()

Поиск
Список
Период
Сортировка

Avoid recalculating pgprocno in ProcArrayAdd()

От
Shinya Kato
Дата:
Hi hackers,

I have fixed the issue mentioned in the subject. This was introduced
in commit 28f3915b7.

-- 
Best regards,
Shinya Kato
NTT OSS Center

Вложения

Re: Avoid recalculating pgprocno in ProcArrayAdd()

От
Chao Li
Дата:

> On Jan 22, 2026, at 13:34, Shinya Kato <shinya11.kato@gmail.com> wrote:
>
> Hi hackers,
>
> I have fixed the issue mentioned in the subject. This was introduced
> in commit 28f3915b7.
>
> --
> Best regards,
> Shinya Kato
> NTT OSS Center
> <v1-0001-Avoid-recalculating-pgprocno-in-ProcArrayAdd.patch>

LGTM. This is not correctness fix.

```
void
ProcArrayAdd(PGPROC *proc)
{
// GetNumberFromPGProc(proc) has been stored in a local variable
    int            pgprocno = GetNumberFromPGProc(proc);

// Later, the local variable should be used. This patch changes GetNumberFromPGProc(proc) to pgprocno here.
        arrayP->pgprocnos[index] = GetNumberFromPGProc(proc);
```

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







Re: Avoid recalculating pgprocno in ProcArrayAdd()

От
Shinya Kato
Дата:
On Thu, Jan 22, 2026 at 2:58 PM Chao Li <li.evan.chao@gmail.com> wrote:
> > <v1-0001-Avoid-recalculating-pgprocno-in-ProcArrayAdd.patch>
>
> LGTM. This is not correctness fix.

Thank you for the review! I've updated the commit message and I'll
mark it as Ready for Committer if there are no objections.

--
Best regards,
Shinya Kato
NTT OSS Center

Вложения

Re: Avoid recalculating pgprocno in ProcArrayAdd()

От
Shinya Kato
Дата:
On Thu, Feb 12, 2026 at 10:41 AM Shinya Kato <shinya11.kato@gmail.com> wrote:
> Thank you for the review! I've updated the commit message and I'll
> mark it as Ready for Committer if there are no objections.

I've marked it as Ready for committer.


--
Best regards,
Shinya Kato
NTT OSS Center