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 1lKMtN-0005Ok-Ls for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Mar 2021 15:06:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lKMtM-0007f5-Gc for pgsql-bugs@arkaria.postgresql.org; Thu, 11 Mar 2021 15:06:24 +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 1lKMtM-0007ey-AM for pgsql-bugs@lists.postgresql.org; Thu, 11 Mar 2021 15:06:24 +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 1lKMtK-0006Wn-9a for pgsql-bugs@lists.postgresql.org; Thu, 11 Mar 2021 15:06:23 +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 12BF6KZn2291217; Thu, 11 Mar 2021 10:06:20 -0500 From: Tom Lane To: Pavel Stehule cc: rekgrpth@gmail.com, PostgreSQL mailing lists Subject: Re: BUG #16921: small memory leak In-reply-to: References: <16921-23c47c8f89ba7855@postgresql.org> Comments: In-reply-to Pavel Stehule message dated "Thu, 11 Mar 2021 12:34:44 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2291215.1615475180.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 11 Mar 2021 10:06:20 -0500 Message-ID: <2291216.1615475180@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Pavel Stehule writes: > čt 11. 3. 2021 v 12:04 odesílatel PG Bug reporting form < > noreply@postgresql.org> napsal: >> Is there a small memory leak here? >> file: postgres/src/pl/plpgsql/src/pl_handler.c > if I understand to source code, then it is released in function > set_extra_field in file guc.c Yeah, a GUC variable's "extra" storage is managed by guc.c. It would be completely wrong for those plpgsql routines to free it. regards, tom lane