Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e0Gz6-0000tW-Q7 for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 00:59:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e0Gz6-0004VL-7i for pgsql-bugs@arkaria.postgresql.org; Fri, 06 Oct 2017 00:59:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0Gz4-0004Uj-Ha for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 00:59:22 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e0Gz0-000794-9y for pgsql-bugs@postgresql.org; Fri, 06 Oct 2017 00:59:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7CDDB20CF4; Thu, 5 Oct 2017 20:59:16 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Thu, 05 Oct 2017 20:59:16 -0400 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-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=Oecv4vLpvZDGttRjFm NEmtwV4HAYRgbZzUxgOBG/bk8=; b=eZCP3YTfIo0L+pKSLD5c02cxmnjenTzMIh QZBnKyjgrDVGhLiRc6QpP9hAJPI7udhwTBLE5chP8l4SvaVnyNCQM+UuizuvZ/+U FBO+NLfRhK6HJx02b5gz2bl6ZL8MHG6QMEVpjddw07/SBT6enSenuHdZCdiUZzQh yUTeSTxXlWdTs/ZqLK+Iqaiw1HWdfJtQIH2mUF9E9h7gvJQMJbnw8jJy7iLZTjoQ gPcfMdVNASWx7CnSZ1f3ZFa17VYAvrloNccCl3Yoy1NZnDXDuCv9lt7F/bS6/uiI kiCIyWHIVhhR5Rd7nvtR6Wr82ZISwrOjzzYwkgZh0/bWxTB8V9Bw== X-ME-Sender: X-Sasl-enc: rO9Uhz12OBx+eH4S8mO+I5jEgZiOTti0ao7/trqNXAIA 1507251556 Received: from intern.anarazel.de (unknown [136.24.76.72]) by mail.messagingengine.com (Postfix) with ESMTPA id 369E0246C4; Thu, 5 Oct 2017 20:59:16 -0400 (EDT) Date: Thu, 5 Oct 2017 17:59:15 -0700 From: Andres Freund To: Tom Lane Cc: Michael Paquier , Ben Chobot , PostgreSQL mailing lists Subject: Re: pg_logical_slot_peek_changes crashes postgres when called from inside pl/pgsql Message-ID: <20171006005915.lyivbm6fplmbmon2@alap3.anarazel.de> References: <73FBA179-C68C-4540-9473-71E865408B15@silentmedia.com> <8637.1507217920@sss.pgh.pa.us> <20171005211058.z5obk2c2e7zvauk6@alap3.anarazel.de> <32374.1507239819@sss.pgh.pa.us> <20171005230105.qv2yrtadbkbc5y5r@alap3.anarazel.de> <4563.1507246950@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4563.1507246950@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 2017-10-05 19:42:30 -0400, Tom Lane wrote: > I dug around in the archives and found Ah thanks. > https://www.postgresql.org/message-id/26365.1162532453%40sss.pgh.pa.us > > The function shown there doesn't appear to leak any memory at all in HEAD, > but if you dike out the memory context reset in question, it leaks like > crazy. I didn't try to reconfirm my old estimate of 16KB per iteration, > but it seemed to be in that ballpark still. Just ran this, got out-of-memory error, and then another out-of-memory error, ... I wonder if we should exclude out_of_memory from OTHERS, like we do QUERY_CANCELED and ASSERT_FAILURE. (looking) Greetings, Andres Freund -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs