pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Quan Zongliang <quanzongliang@yeah.net>
To: Tatsuya Kawata <kawatatatsuya0913@gmail.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Remove stale comment and dead store in BuildTupleHashTable
Date: Tue, 11 Aug 2026 10:01:23 +0800
Message-ID: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net> (raw)
In-Reply-To: <CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com>
References: <CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com>



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







view thread (5+ messages)  latest in thread

Message-ID: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net>
Permalink:  ../69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net/
Also on:    postgresql.org/message-id/69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: quanzongliang@yeah.net, kawatatatsuya0913@gmail.com
  Subject: Re: [PATCH] Remove stale comment and dead store in BuildTupleHashTable
  In-Reply-To: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net>
  References: <CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com> <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox