On Fri Jul 31, 2026 at 2:35 AM CDT, Michael Paquier wrote:
> On Fri, Jul 31, 2026 at 03:54:33AM +0000, Tristan Partin wrote:
>> Let me see what I can come up with. As a committer, how would you like 
>> the patches? I could do file by file, subsystem by subsystem, or just 
>> one large single patch? I don't mind putting in the work to translate 
>> all realloc calls where it makes sense, but I would like to make sure 
>> I organize it in such a way to minimize work for you.
>
> All of these are mechanical changes, and it is possible to do a set of
> `git add` to split these across sub-directories.  So a single huge
> patch does not change much compared to many small ones from my
> perspective.  So your call.

I started working on this yesterday. One pattern that became pretty 
noticeable was:

        buf = MemoryContextAlloc(context, elements * sizeof(*buf));
        ...
        buf = repalloc(buf, new_elements * sizeof(*buf));

I wonder if we should add MemoreContextAllocArray() and friends, similar 
to palloc_array().

-- 
Tristan Partin
PostgreSQL Contributors Team
AWS (https://aws.amazon.com)


Reply via email to