Thread
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Use the GetPGProcByNumber() macro when possible
- 4c144e0452da 19 (unreleased) landed
-
Preferred use of macro GetPGProcByNumber
Maksim.Melnikov <m.melnikov@postgrespro.ru> — 2025-09-12T12:39:09Z
Hello hackers, I've noticed some places where elements of ProcGlobal->allProcs are addressed directly via arr index. But in proc.h macros GetPGProcByNumber exist, that was added to get proc objects by index, so I suggest minor refactoring 'ProcGlobal->allProcs[index]' -> 'GetPGProcByNumber(index)'. Please, see attached patch, branched from rev 6ede13d1b5f. Best regards Melnikov Maksim
-
Re: Preferred use of macro GetPGProcByNumber
Chao Li <li.evan.chao@gmail.com> — 2025-09-15T02:06:33Z
> On Sep 12, 2025, at 20:39, Maksim.Melnikov <m.melnikov@postgrespro.ru> wrote: > > Hello hackers, > I've noticed some places where elements of ProcGlobal->allProcs are addressed directly via arr index. > But in proc.h macros GetPGProcByNumber exist, that was added to get proc objects by index, > so I suggest minor refactoring 'ProcGlobal->allProcs[index]' -> 'GetPGProcByNumber(index)'. > Please, see attached patch, branched from rev 6ede13d1b5f. > > Best regards > Melnikov Maksim > <v1-0001-Preferred-use-of-macro-GetPGProcByNumber.patch> For the replacements in procarray.c, there may have slight performance difference. The current version stores dereferenced “allProcs” in a local static variable, which is faster than using the macro because the macro need to dereference “allProcs” from the “ProcGlobal” every time when it is called. In other files, they are just simple direct replacements, so they should be fine. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/
-
Re: Preferred use of macro GetPGProcByNumber
Maksim.Melnikov <m.melnikov@postgrespro.ru> — 2025-09-16T08:05:58Z
Thanks for your comment, I've attached patch version without procarray.c changes. Best regards Melnikov Maksim
-
Re: Preferred use of macro GetPGProcByNumber
Chao Li <li.evan.chao@gmail.com> — 2025-09-16T08:19:23Z
> On Sep 16, 2025, at 16:05, Maksim.Melnikov <m.melnikov@postgrespro.ru> wrote: > > Thanks for your comment, I've attached patch version without procarray.c changes. > > > Best regards > > Melnikov Maksim > <v2-0001-Preferred-use-of-macro-GetPGProcByNumber.patch> V2 LGMT. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/