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 1hxFfl-0005uo-1D for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Aug 2019 19:08:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hxFfj-0004w1-RJ for pgsql-hackers@arkaria.postgresql.org; Mon, 12 Aug 2019 19:07:59 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxFfj-0004vu-GT for pgsql-hackers@lists.postgresql.org; Mon, 12 Aug 2019 19:07:59 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hxFfg-0004dG-P9 for pgsql-hackers@postgresql.org; Mon, 12 Aug 2019 19:07:59 +0000 Received: by mail-qt1-x844.google.com with SMTP id l9so103875960qtu.6 for ; Mon, 12 Aug 2019 12:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=/RaUWuCFsa6FiYLxk5wX+UJ2E/bWl/a+4SRvdeQeLc8=; b=H1dkwMttunoP8Ak6q4kaAgzIzTdB62zy106Ks4iRUPoMd+97VcKS4HllEguPo5VP7e KGU3fdppyY2N9dl6IKeToduEJJOffTbxA1vp8bq1Vilsm43WY9DE4pt41ExHfeHGFLN5 g8BlOXNPXFWEw/x25ADTx3a2Q3hEt7GvCz5i6QqGsvBuDjbsGwRUP458RmxzEVI+z1q6 7CnlZ2vpmhrrdbFy0BCnT0KxhI+S45fnX9feJ/qHLQF8y+Y+PbQ8zKMkVFh/yaTsop7f 6I+VwxA3x2dPrgi6TOxstmhwqutMO1GyTs8PKiSJuznA41xYKHtJF5eL1JjMFr7LOzyk TK5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=/RaUWuCFsa6FiYLxk5wX+UJ2E/bWl/a+4SRvdeQeLc8=; b=ZzvdItcSGqzrZgVDKwTLkj9RrRITDG9wV9QzI65R07nJLDrbi1+Q8dirgpN4me0IOD /f10uWNhgM6MWnq69w8n7rkP/SNJf4WhKFoGKYtt238SqO9o+rsmOKCyh38kaw9fwCD7 HPge330t/CTXLLBFpsGxFNnaXWnMw0HPDGHV8Iy8GTpcRUgswXfAfmz+PpBwcP2InIFy QCDfbcFByPrws8Fbz65lFIFZAkY1uIsnRMD9lDO4vSPTcm/wDcin1dXkNvWQ/1+dwpMd VMEr8M17QRiFXn9w2S4FmcNYOFZqu2oyGWEMOdHRDEIaY7F7GCZRTwwfejLV0P/KU4VM kSyw== X-Gm-Message-State: APjAAAX1XPoNQSeOfk0/T08IPw71bkehyi8eIiPGUKxuwoNcNBx8w5GQ 6i7D8OZGSBATM7LKl+/wkhASew== X-Google-Smtp-Source: APXvYqy2Mx4fX/zDxMETmxKUkdACziKwAWeFFm2x/HAgLb0oPv6aRnWNqLkF19kV+9Nb6mzJSbQ3xA== X-Received: by 2002:a05:6214:42e:: with SMTP id a14mr32204581qvy.19.1565636874589; Mon, 12 Aug 2019 12:07:54 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([177.154.145.101]) by smtp.gmail.com with ESMTPSA id h18sm42254288qkj.134.2019.08.12.12.07.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 12 Aug 2019 12:07:54 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 167DC123B29; Mon, 12 Aug 2019 15:07:49 -0400 (-04) Date: Mon, 12 Aug 2019 15:07:49 -0400 From: Alvaro Herrera To: Thomas Munro Cc: Robert Haas , vignesh C , Amit Kapila , Tom Lane , Jerry Sievers , Tomas Vondra , pgsql-hackers Subject: Re: SegFault on 9.6.14 Message-ID: <20190812190749.GA13961@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Aug-12, Thomas Munro wrote: > That's possibly relevant because it means we'd have a ParallelContext > or some new overarching object that has a lifetime that is longer than > the individual Gather nodes' processes and instrumentation data. I'm > not saying we need to discuss any details of this other concern now, > I'm just wondering out loud if the whole problem in this thread goes > away automatically when we fix it. How likely is it that we would ever be able to release memory from a Sort (or, say, a hashjoin hash table) when it's done being read, but before completing the whole plan? As I understand, right now we hold onto a lot of memory after such plans have been fully read, for no good reason other than executor being unaware of this. This might not be directly related to the problem at hand, since it's not just parallel plans that are affected. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services