From: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Rename functions to alloc/free things in reorderbuffer.c |
Date: | 2025-03-12 17:53:08 |
Message-ID: | c9e43d2d-8e83-444f-b111-430377368989@iki.fi |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I noticed some weird naming conventions in reorderbuffer.c which are
leftovers from a long time ago when reorderbuffer.c maintained its own
small memory pools to reduce palloc/pfree overhead. For example:
extern Oid *ReorderBufferGetRelids(ReorderBuffer *rb, int nrelids);
extern void ReorderBufferReturnRelids(ReorderBuffer *rb, Oid *relids);
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.
Any objections?
--
Heikki Linnakangas
Neon (https://neon.tech)
Attachment | Content-Type | Size |
---|---|---|
0001-Rename-alloc-free-functions-in-reorderbuffer.c.patch | text/x-patch | 19.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kirill Reshke | 2025-03-12 18:09:19 | Re: Primary and standby setting cross-checks |
Previous Message | Devulapalli, Raghuveer | 2025-03-12 17:49:50 | RE: CRC32C Parallel Computation Optimization on ARM |