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.94.2) (envelope-from ) id 1s1orx-00F9ox-Vw for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2024 14:54:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s1oru-006isA-VF for pgsql-bugs@arkaria.postgresql.org; Tue, 30 Apr 2024 14:54:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1oru-006is1-Mq for pgsql-bugs@lists.postgresql.org; Tue, 30 Apr 2024 14:54:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1ort-000rWn-9e for pgsql-bugs@lists.postgresql.org; Tue, 30 Apr 2024 14:54:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43UEs3lf1670905; Tue, 30 Apr 2024 10:54:03 -0400 From: Tom Lane To: David Rowley cc: Alexander Lakhin , Robert Haas , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize In-reply-to: References: <17855-5f523e0f9769a566@postgresql.org> <3943232.1714060238@sss.pgh.pa.us> <1228403.1714400922@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Tue, 30 Apr 2024 12:48:30 +1200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1670903.1714488843.1@sss.pgh.pa.us> Date: Tue, 30 Apr 2024 10:54:03 -0400 Message-ID: <1670904.1714488843@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk David Rowley writes: > I think this is a good idea. It seems reasonable that some other AM > might want to do the same thing. Also, it allows me to choose a better > name for these new IndexOnlyScanState fields. ioss_NameCStringAttNums > and ioss_NameCStringCount seems more on point. However, I couldn't > really decide which way around to have Name and CString. This version LGTM. The field names are fine, or at least I don't see a reason to prefer the other way. One trivial nit: should we make the array be AttrNumber* instead of int*? The space saving would be negligible (it being very unlikely that there's ever more than one entry), but AttrNumber is a more specific description of what it is. regards, tom lane