| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Shinya Kato <shinya11(dot)kato(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Avoid recalculating pgprocno in ProcArrayAdd() |
| Date: | 2026-01-22 05:57:27 |
| Message-ID: | 667B43E6-B6AA-4AF1-86F1-C2C9B9B96E04@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Jan 22, 2026, at 13:34, Shinya Kato <shinya11(dot)kato(at)gmail(dot)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/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | jian he | 2026-01-22 06:08:27 | Re: CREATE TABLE LIKE INCLUDING TRIGGERS |
| Previous Message | jian he | 2026-01-22 05:45:54 | Re: CREATE TABLE LIKE INCLUDING POLICIES |