Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5zG4-0005cG-Qn for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 20:53:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h5zG3-0000f6-6z for pgsql-bugs@arkaria.postgresql.org; Mon, 18 Mar 2019 20:53:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5zG2-0000ez-TA for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 20:53:19 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h5zFw-0007iX-3p for pgsql-bugs@lists.postgresql.org; Mon, 18 Mar 2019 20:53:17 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 0ABA92D63; Mon, 18 Mar 2019 16:53:10 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 18 Mar 2019 16:53:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=QWqjxrcYO5m7Bc7gLE7ncx6BG97 QHrQl50o63v0RpFo=; b=kOiv+ZrCjrJpBqYNxSUPDyAosAgJaYRlyyzpiIeaEB+ hkJLHWMHILSdnT3A6fuCpOYOJrQ304o/lkuyx5L3WDTCimuLDTntUKowmwO0TWKl iyPBWL+e2bloRMXyglE4V6dqP7rSIzgoa5+DDgKWxIT3Xj+fYcwJjokCVxIFaRv4 7oelL0hc+nYoyyKGo4W0xvjUjr5hq1iEltq0cfjGonZmYvfBzxpZQEZaXmARpSnc hxZFv9GFC6ZXXIKi6qD8pJqWvm/ie8nS/pFZlXa7giqJiBkHjdTh8FQe2yVdavoA uFIsbalUw0RhFnzsYX+NlT49w5/8M922MD7M33187pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=QWqjxr cYO5m7Bc7gLE7ncx6BG97QHrQl50o63v0RpFo=; b=Mcj8I9pcOUO81SB3mr6otG BukguF9MXgspojRtsSk66PKYHwwBMe0mEcTyrhJ1ltqUvBbCfPpgry9DktTGXftx ctQoW8JoSva8BdUmdAlmYO50WNp0eUl9HJspX7YR/zkags2objbTxVulJRhAm7dr 15gaHgD8EtFUCVj7zVVA02WXjjblNuneBHGZ94/FppBbxistrNQ6SS0e4oNlsfuZ XJC8RBfetZcAGh1BDhlGBai4UgfslZ91hUnIzFi3jIOhqsxMBH5oaz4XNVdc5J2w O2FqjhylMZE2o+ka1GV5mwCNER00cn5n/exelyCE1ntjfvRcE1hdlStWtXlzyd+Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddriedugddugeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucfkpheple ekrddvuddtrddugedtrddujedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgv shesrghnrghrrgiivghlrdguvgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id 221A6E4210; Mon, 18 Mar 2019 16:53:09 -0400 (EDT) Date: Mon, 18 Mar 2019 13:53:07 -0700 From: Andres Freund To: Jeff Janes Cc: Matthias Otterbach , Tom Lane , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15700: PG 10 vs. 11: Large increase in memory usage when selecting BYTEA data (maybe memory leak) Message-ID: <20190318205307.jvqlnsih2qbrkdus@alap3.anarazel.de> References: <15700-8c408321a87d56bb@postgresql.org> <16717.1552926811@sss.pgh.pa.us> <4ef5f38d5710c4d5c289537c588c7335@otterbach.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-03-18 16:44:02 -0400, Jeff Janes wrote: > On Mon, Mar 18, 2019 at 2:50 PM Jeff Janes wrote: > > > > > Doing that, I can reproduce the problem, and it seems to be using an > > implicitly declared cursor (which I have not run into before). > > > > > The culprit is f2dec34e19d3969ddd6. Also, it doesn't depend on bytea, it > leaks for text as well. > > I looked at the patch and nothing in jumps out to me as causing a leak. > > commit f2dec34e19d3969ddd616e671fe9a7b968bec812 > Author: Andres Freund > Date: Wed Oct 11 16:26:35 2017 -0700 > > Use one stringbuffer for all rows printed in printtup.c. Thanks for figuring that out. On a quick scan I don't see anything obvious. Let me try this out. - Andres