From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Refactoring: join MakeSingleTupleTableSlot() and MakeTupleTableSlot() |
Date: | 2021-10-22 13:39:37 |
Message-ID: | CAJ7c6TOg==suNRgtPFKPxp-Uau5R3OW0QCXS_XCxjVkrrBuz2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
During the discussion [1] it was discovered that we have two
procedures in execTuples.c that do the same thing:
* MakeSingleTupleTableSlot()
* MakeTupleTableSlot()
In fact, MakeSingleTupleTableSlot() is simply a wrapper for
MakeTupleTableSlot().
I propose keeping only one of these procedures to simplify navigating
through the code and debugging, and maybe saving a CPU cycle or two. A
search for MakeTupleTableSlot produced 8 matches across 2 files, while
MakeSingleTupleTableSlot is used 41 times across 26 files. Thus the
proposed patch removes MakeTupleTableSlot and keeps
MakeSingleTupleTableSlot to keep the patch less invasive and simplify
backporting of the other patches. Hopefully, this will not complicate
the life of the extension developers too much.
The patch was tested on MacOS against `master` branch b1ce6c28.
--
Best regards,
Aleksander Alekseev
Attachment | Content-Type | Size |
---|---|---|
v1-0001-refactoring-MakeTupleTableSlot.patch | application/octet-stream | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aleksander Alekseev | 2021-10-22 13:44:09 | Re: [PATCH] Fix memory corruption in pg_shdepend.c |
Previous Message | Tom Lane | 2021-10-22 13:38:40 | Re: [PATCH] Fix memory corruption in pg_shdepend.c |