Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhacu-0005uc-TA for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Nov 2021 16:57:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mhact-0000bB-Lo for pgsql-hackers@arkaria.postgresql.org; Mon, 01 Nov 2021 16:57:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhact-0000b1-DG for pgsql-hackers@lists.postgresql.org; Mon, 01 Nov 2021 16:57:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mhacn-0004zw-6w for pgsql-hackers@postgresql.org; Mon, 01 Nov 2021 16:57:38 +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 1A1GvRTd1142781; Mon, 1 Nov 2021 12:57:27 -0400 From: Tom Lane To: "Bossart, Nathan" cc: Kyotaro Horiguchi , "michael@paquier.xyz" , "andres@anarazel.de" , "sulamul@gmail.com" , "pgsql-hackers@postgresql.org" Subject: Re: inefficient loop in StandbyReleaseLockList() In-reply-to: References: <0108A03D-FF2B-4CBC-933B-E047CD975158@amazon.com> <1013797.1635709095@sss.pgh.pa.us> <1043766.1635713701@sss.pgh.pa.us> <20211101.114019.1470121542110379535.horikyota.ntt@gmail.com> <1138901.1635782315@sss.pgh.pa.us> Comments: In-reply-to "Bossart, Nathan" message dated "Mon, 01 Nov 2021 16:50:55 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1142779.1635785847.1@sss.pgh.pa.us> Date: Mon, 01 Nov 2021 12:57:27 -0400 Message-ID: <1142780.1635785847@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Bossart, Nathan" writes: > On 10/31/21, 1:55 PM, "Tom Lane" wrote: >> 1. Attached is a proposed patch to get rid of the calls in trgm_regexp.c. > Should there be a list_free(trgmNFA->queue) at the end of > transformGraph()? There could be, but that's visibly invoked only once per createTrgmNFAInternal call, so I didn't think it was worthwhile to do so (unlike the case for processState). If we were concerned about leakage in that function, the hash table would be a far bigger issue. regards, tom lane