| From: | Tatsuya Kawata <kawatatatsuya0913(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | [PATCH] Remove stale comment and dead store in BuildTupleHashTable |
| Date: | 2026-08-09 11:22:35 |
| Message-ID: | CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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 */
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.
The attached patch removes both. Nothing reads tableslot before
slot is actually created.
Regards,
Tatsuya Kawata
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Remove-stale-comment-and-dead-store-in-BuildTuple.patch | application/octet-stream | 1.6 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chengpeng Yan | 2026-08-09 12:50:09 | Re: Is there value in having optimizer stats for joins/foreignkeys? |
| Previous Message | Hannu Krosing | 2026-08-09 11:22:19 | Re: Adding comments to extension objects |