| From: | Quan Zongliang <quanzongliang(at)yeah(dot)net> |
|---|---|
| To: | Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Remove stale comment and dead store in BuildTupleHashTable |
| Date: | 2026-08-11 02:01:23 |
| Message-ID: | 69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 8/9/26 7:22 PM, Tatsuya Kawata wrote:
> Hi,
>
> While reading the aggregation-related executor code, I noticed a comment
> that no longer matches what the code does.
>
> In BuildTupleHashTable() (src/backend/executor/execGrouping.c) we have:
>
> hashtable->tableslot = NULL; /* will be made on first lookup */
>
This initialization was initially introduced in the patch f97aebd1.
The hashtable->tableslot is initialized in the LookupTupleHashEntry
function.
> The slot is no longer made on first lookup. Commit bf6c614a2f2 removed
> the lazy creation from LookupTupleHashEntry() and made
> BuildTupleHashTable() create the slot unconditionally, further down in
> the same function. Only the comment and its assignment were left behind.
>
It also involves patch 773aec7a and its revert patch 2a41507d
Initialization is no longer necessary.
--
Quan Zongliang
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ajin Cherian | 2026-08-11 02:06:51 | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |
| Previous Message | David Rowley | 2026-08-11 01:37:38 | Re: Show estimated number of groups for IncrementalSort in EXPLAIN |