Rename functions to alloc/free things in reorderbuffer.c
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-03-12T17:53:08Z
Lists: pgsql-hackers
Attachments
- 0001-Rename-alloc-free-functions-in-reorderbuffer.c.patch (text/x-patch) patch 0001
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)
Commits
-
Rename alloc/free functions in reorderbuffer.c
- ac4494646dae 18.0 landed