Re: Increase repalloc_array() usage in buffile.c - Mailing list pgsql-hackers

From Tristan Partin
Subject Re: Increase repalloc_array() usage in buffile.c
Date
Msg-id DKJB5887LGX9.359DV1UMZ1URK@partin.io
Whole thread
In response to Re: Increase repalloc_array() usage in buffile.c  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Fri Jul 31, 2026 at 7:35 AM UTC, 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.

Here are 3 patches that hope to modernize most vanilla palloc() calls
where appropriate.

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

Attachment

pgsql-hackers by date:

Previous
From: Scott Ray
Date:
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples
Next
From: John Naylor
Date:
Subject: Re: [Patch]The Case For WAL-Logging pg_upgrade