Re: Fix and improve allocation formulas - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Fix and improve allocation formulas
Date
Msg-id o3rr5kphfvnaj22h7uge2ng4lga54r3z7tpitaxtzrwihw4m4i@onss5zjjbj27
Whole thread Raw
In response to Fix and improve allocation formulas  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Fix and improve allocation formulas
Re: Fix and improve allocation formulas
List pgsql-hackers
Hi,

On 2025-12-11 13:27:56 +0000, Bertrand Drouvot wrote:
> - 0002 is a very large patch. I think that it provides added value as mentioned
> above but I'm not sure it is worth the noise. Anyway it is done, so sharing
> here to get your thoughts.

I find the recent trend to sent auto-generated huge patches to the list
... not great. I think there's practially zero chance of them getting applied
and it takes away mental bandwidth from stuff that has a chance.

I tend to agree that what you propose is the better style, but I seriously
doubt that

a) changing over everything at once is worth the backpatch hazard and review
   pain
b) that to judge whether we should do this a 277kB patch is useful
c) that changing the existing code should be the first thing, if we want to
   make this the new style, we should first document the sizeof(*var) approach to
   be preferred.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Consistently use palloc_object() and palloc_array()
Next
From: Tom Lane
Date:
Subject: Re: regex Quantifiers {m,n}, m can be negative, n greater than 255