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 1tKesT-00A1xy-Gq for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Dec 2024 14:36:49 +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 1tKerS-009TOP-JB for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Dec 2024 14:35:47 +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.94.2) (envelope-from ) id 1tKepM-009Pz1-1T for pgsql-bugs@lists.postgresql.org; Mon, 09 Dec 2024 14:33:37 +0000 Received: from fout-b5-smtp.messagingengine.com ([202.12.124.148]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tKepK-001uhF-F3 for pgsql-bugs@lists.postgresql.org; Mon, 09 Dec 2024 14:33:35 +0000 Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id B6F4E1140136; Mon, 9 Dec 2024 09:33:32 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Mon, 09 Dec 2024 09:33:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1733754812; x=1733841212; bh=y25Eq/nOr5osn yL5fszTBlGenmxZIlRpF3DBFu6CKic=; b=zpj02oCKFde1XvezdDQhk9avh/767 ZG/8YVhndmqNmVvBx/0lki1LeeVUNs1FJXBNnDUcu9ZVqA997IVxWt2i8plpb9Gu KScSm5B+mOHh8C0c1E8gHoNC1kmkzxg15i5qVYEauNsby/FS8vyNUEi9Rj5W5u+S sv1yyiCKTdyg0iGPWd0IJKeexQkfG8DbNA84UinYkVIVcwtJnoFdHqQusQGdip86 RhV50x0owpvH/6V2vM4D0Cx+7/c2QQA1/qN+fwcVE9HSQ4l9B/ACDDkZNrx03gvo EJw0Zr6CJaTEMOfHsToidfEikiYEsl1QwM9h99A7OxBTl2wwoqo1+oWvQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeeigdeflecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukf ggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcu oegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrh hnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveejudefgeeuvdejhfeuleen ucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdr nhhoqdhiphdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepphhgshhqlhdqsghughhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdr ohhrghdprhgtphhtthhopegurghnqdgvlhhisehmrghilhdrrhhu X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 9 Dec 2024 09:33:31 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1733754808; bh=wzoNIhXpTkgnAecklcYWJJZ/ifF+lbcoG5AN4mQH/Jk=; h=Date:From:To:Subject:In-Reply-To:From; b=OuZw9JYV9TQK7Y4Agu01MivzJrq60T49+LZn2ha0rOwepbVPmfm8QTUsNaL0YIY0j /khGejPgc13TI+oqyGyNQ8VNSe/ujkE3OJ0ZFRgXmpuQSyAD12zxQX73Ebz5qP2Pmk 2DCHXhP10FBzZbeHzbmlWkb4dplvhOum6ZSRsS1PfJn5JCRwO73tPApeWXYJq9zfzw ws1xyE/Z+lOVHzSabt1cQ13zjGytrnkDhvZ9dRlocys3aXUIUoLYvBZCqLjKp65DH3 Uz0R4hkoq6xRX9kNd12AawolbhrS0ynBflMgqILavXDHyKBvnhYawn6zre2Ks1qF69 5b3wPXzsvRkgw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C57709B; Mon, 9 Dec 2024 15:33:28 +0100 (CET) Date: Mon, 9 Dec 2024 15:33:28 +0100 From: Alvaro Herrera To: dan-eli@mail.ru, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18746: /src/backend/parser/parse_utilcmd.c Message-ID: <202412091433.cg4ae6bd7fjr@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18746-2b3bdd60a982a674@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Dec-09, PG Bug reporting form wrote: > Dynamic memory, referenced by 'colname', is allocated at ruleutils.c:3587 by > calling function 'deparse_expression' at parse_utilcmd.c:4061 and lost at > parse_utilcmd.c:4100. I think this refers to transformPartitionBound() which calls deparse_expression(). I don't think a memory leak here is very interesting, because this is DDL code which should be called in a short-lived memory context, so it's freed soon afterwards. (I bet you could find thousands of cases of similar situations elsewhere in the DDL code.) Indeed, transformPartitionBound is only called by DefineRelation (used to create a table or similar) or transformPartitionCmd, which is called for ALTER TABLE ... ATTACH/DETACH PARTITION. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The problem with the future is that it keeps turning into the present" (Hobbes)