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: Wed, 12 Aug 2026 17:31:15 +0800
Message-ID: <63ec33c0-0631-4a6b-9f14-522b823f7c8d@yeah.net> (raw)
In-Reply-To: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net>
References: <CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com>
	<69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net>



On 8/11/26 10:01 AM, Quan Zongliang wrote:
> 
> 
> 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.
> 
This is a very clear and straightforward code refactoring. There won't 
be any objections. Change to "Ready for Committer".

--
Quan Zongliang







view thread (5+ messages)  latest in thread

Message-ID: <63ec33c0-0631-4a6b-9f14-522b823f7c8d@yeah.net>
Permalink:  ../63ec33c0-0631-4a6b-9f14-522b823f7c8d@yeah.net/
Also on:    postgresql.org/message-id/63ec33c0-0631-4a6b-9f14-522b823f7c8d@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: <63ec33c0-0631-4a6b-9f14-522b823f7c8d@yeah.net>
  References: <CAHza6qfduAcYc3HdXP5DYscNstz0ic6ctHTNH70VL1Uy-nJ6zg@mail.gmail.com> <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net> <63ec33c0-0631-4a6b-9f14-522b823f7c8d@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