Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wu5J8-000SNx-2e for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 09:31:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wu5J6-006gt9-2J for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Aug 2026 09:31:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wu5J5-006gsg-2F for pgsql-hackers@lists.postgresql.org; Wed, 12 Aug 2026 09:31:33 +0000 Received: from mail-m16.yeah.net ([1.95.21.16]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wu5Iy-00000000FfN-09tw for pgsql-hackers@postgresql.org; Wed, 12 Aug 2026 09:31:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yeah.net; s=s110527; h=Message-ID:Date:MIME-Version:Subject:From:To: Content-Type; bh=Z3wKj0oHceazuDMKzmgcBOdCfO4ztqUnEHRtJxeT0fk=; b=cX0W2wvxBGiChxbc2ZotR+Paq8wCtfWw7/nwBR9aVpdALeyA+rWCP9b3u3hjq+ hXT8ar0bgor5Qec7OSPyhlivxfQ/zm8h2s4Y+h6B3tW8Vs4bOUcXNGOTvtH8e3wX 6T/zGZO2PjmOmSLQDa7d+LamvESMpdlwvRqqkw8I2uVbE= Received: from [IPV6:2408:8210:3c41:6440:70a7:7352:f75:16d1] (unknown []) by gzsmtp2 (Coremail) with UTF8SMTPA id Ms8vCgD3FxRkPXxq4F23Aw--.40804S2; Wed, 12 Aug 2026 17:31:16 +0800 (CST) Message-ID: <63ec33c0-0631-4a6b-9f14-522b823f7c8d@yeah.net> Date: Wed, 12 Aug 2026 17:31:15 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Remove stale comment and dead store in BuildTupleHashTable From: Quan Zongliang To: Tatsuya Kawata , PostgreSQL-development References: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net> Content-Language: en-US In-Reply-To: <69ac9183-56fd-47c0-a368-57b74aabd1d1@yeah.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: Ms8vCgD3FxRkPXxq4F23Aw--.40804S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrurykAry3Cr45Zr1UWw1kGrg_yoWkGrb_Cr 4rurykW34qvFWxXF47t3y5Aw1DGw4kZr17G34kG3sIqr13Aws8ZF97Wr97ZF48WrsrAFn8 urnYgw42yrnF9jkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xR_UUUUUUUUU== X-Originating-IP: [2408:8210:3c41:6440:70a7:7352:f75:16d1] X-CM-SenderInfo: htxd06xrqjzxxdqjq5hhdkh0dhw/1tbiNwQiRmp8PWQfrQAA3q List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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