Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 172CA1A8BC81 for ; Fri, 27 Jul 2012 02:59:48 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SudaT-0001YN-JA for pgsql-bugs@postgresql.org; Fri, 27 Jul 2012 05:59:47 +0000 Received: by pbbrp8 with SMTP id rp8so4467254pbb.19 for ; Thu, 26 Jul 2012 22:59:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=fu1gUQNDNYetk12xG2jnVijQUHLgFHqcdjBXoVW5i3E=; b=JjX1CBGaarr1jbMLwduLjzd4SRxlITOm+SFWaPS3jmp2S31l25Nse5W9OFT4casu3T ktu7cmMmK1DYENrBs6GxXtKpbkD52fwK7nnstS2+/DLCGvks6P6tjru/T/5BCRuaGHMz Cfaon/wr6YyxfBHsw1YXZlbGMHBPyoYsCx9B9fmfZgKbiNG6F7E9gs/Fj+zh08lLGU7R uoQ6iDjGCjJokpLyq7n6zflMDhWkVRxOLuYrL42C0oSSbsUK/BxLJcZNw4jbDOyJSLcy UawpBPPMIUNT05sFbCNSEdUN/U7TF9CHTszm+mLxYSq+tW7reZJlfUw88PrDCE4GXaVq 2qqw== Received: by 10.68.194.169 with SMTP id hx9mr11256596pbc.8.1343368771053; Thu, 26 Jul 2012 22:59:31 -0700 (PDT) Received: from ayaki.localdomain (124-169-186-146.dyn.iinet.net.au. [124.169.186.146]) by mx.google.com with ESMTPS id pe8sm1217011pbc.76.2012.07.26.22.59.28 (version=SSLv3 cipher=OTHER); Thu, 26 Jul 2012 22:59:30 -0700 (PDT) Message-ID: <50122E3D.4050208@ringerc.id.au> Date: Fri, 27 Jul 2012 13:59:25 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: luben karavelov CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6763: Severe memory leak with arrays and hstore References: <5010FD0F.4020400@ringerc.id.au> <10398EEF-03DE-405E-B276-06F73ABF9E3A@mail.bg> <5011FD7E.305@ringerc.id.au> In-Reply-To: <5011FD7E.305@ringerc.id.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlxKzrXLo+RQbqRIrJubWRJ95oUwD7DzY2f/hLVZeNpgsTClVFFbiThGX/59aTI6g89bTqQ X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201207/219 X-Sequence-Number: 33695 On 07/27/2012 10:31 AM, Craig Ringer wrote: > Ouch. Sure looks like a leak to me, yeah. ... but it turns out I'm not thinking very straight. I forgot to check the size of your `shared_buffers' or `work_mem' and forgot to get you to report `free -m' output after each run to measure _real_ memory use. During testing I did got a backend crash when running an INSERT - which I didn't expect given that I have only 20MB of work_mem and 256MB of shared_buffers. I was surprised by that as I would not have expected that query to require a huge gob of RAM. I didn't dig much further as I'm on a swapless system with overcommit enabled ( 'cos the Java VM does't work with overcommit off ) which isn't exactly a recommended Pg configuration. -- Craig Ringer