From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Rename functions to alloc/free things in reorderbuffer.c |
Date: | 2025-03-12 19:31:21 |
Message-ID: | 2232811.1741807881@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> ReorderBufferGetRelids allocates an array with MemoryContextAlloc, and
> ReorderBufferReturnRelids just calls pfree. The pools are long gone, and
> now the naming looks weird.
> Attached patch renames those functions and other such functions to use
> the terms Alloc/Free. I actually wonder if we should go further and
> remove these functions altogether, and change the callers to call
> MemoryContextAlloc directly. But I didn't do that yet.
Yeah, that is very confusing, especially since nearby code uses
names like ReorderBufferGetFoo for functions that are lookups not
allocations. +1 for Alloc/Free where that's an accurate description.
Given that a lot of these are not just one-liners, I'm not sure that
getting rid of the ones that are would help much.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Borisov | 2025-03-12 19:32:57 | Re: Optimization for lower(), upper(), casefold() functions. |
Previous Message | Heikki Linnakangas | 2025-03-12 19:16:01 | Re: Handle interrupts while waiting on Append's async subplans |