Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bs0fH-000065-RC for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Oct 2016 04:52:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bs0fG-0002Ni-EH for pgsql-hackers@arkaria.postgresql.org; Thu, 06 Oct 2016 04:52:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bs0dr-0000kO-Qu for pgsql-hackers@postgresql.org; Thu, 06 Oct 2016 04:50:48 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bs0do-0007QT-Kn for pgsql-hackers@postgresql.org; Thu, 06 Oct 2016 04:50:46 +0000 Received: by mail-wm0-x232.google.com with SMTP id b201so21528870wmb.0 for ; Wed, 05 Oct 2016 21:50:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=Tg3y79zPa9VkRk8/yYg5Xpxw0/JVq4es4ZDqyF0xrQ8=; b=mr3h9WYvZfFOMeqzo5grh2RTFy0aiNfsyph/a4rdhYbM9sZ1bslvV+jSaOzDe+spSu e5FJonQU7b8mEFoNw5vkoDnWSs39bb7+V6LVBolgOsp+vgzk06vhDxCUsZIAc7H6eFHW ETFxefGcF9fR+69WAf/zYyo7iBkEgb7EqsDABIzPrP8+akDdxQxWnYTLvqMp14xix8MJ nc4tkni1YSnBoKRkTPEfpubtD+1o4mdmT6ErUbWQRg0jiIwoNFxzt9xFzjJwS3VWov4g Os5gE9Oo+520Wvp2ibxskQm/rW4PVAOeyHkxKYOSCNWzPEmsoSli7cPpl9r5iLA0k4vV On1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=Tg3y79zPa9VkRk8/yYg5Xpxw0/JVq4es4ZDqyF0xrQ8=; b=KdKZirBZkK4/09DsfMITem1Iz+uLubuNOCYQk+nUtMvkRZqb5542YOBaLiY655UESF ihtwHfBeTFzARcr9BVYY0mmbXoKdwiriERQiB9mU4twimnHg8mi9LyR5n6o8Fnw8A+UV 2LQcLJ4cCVuMU5/SygyKuxihMaoYxA6zXAOsMS6UhrKE+P00BBS0vgJFkFOvfKVpRU2C K1ZB9fyh3u4QMVKtnTC2p1rAdpLgbexZhH6FkE8OO1YBc0uMvCCHEgo8chJ4P7A8vRBi Dy6tWZpA/B7gmMCvKKN0ol7ST22mXkyGh11f6ecFE6Z9d3PxKUuGmhQHfrIOQS2H/KDu K2rw== X-Gm-Message-State: AA6/9RlHUUDB9gzv0hcWB1IzF+0wAMZK6tvzH7WxE5v6Y/9c4EGpwy+JPSQIhXEBFBFr4ZEH/A4N0Q4b6Fv6JnRo1tq78SFwIBMB7Cwl8UItaPfiwGeSk4G556qR7VJX59Oo+Im2rPvcdfEVislqqd3wWBf3EHiCtOYzp3FONgQ6Z+1lqPV/Ry1fdh/3fZnwj/XhN1ZXVxwv X-Received: by 10.194.11.100 with SMTP id p4mr10076593wjb.125.1475729442388; Wed, 05 Oct 2016 21:50:42 -0700 (PDT) Received: from [10.137.2.20] (ip-89-177-44-58.net.upcbroadband.cz. [89.177.44.58]) by smtp.gmail.com with ESMTPSA id lz5sm12170826wjb.24.2016.10.05.21.50.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Oct 2016 21:50:41 -0700 (PDT) To: pgsql-hackers@postgresql.org From: Tomas Vondra Subject: memory leak in e94568ecc10 (pre-reading in external sort) Message-ID: <7303da46-daf7-9c68-3cc1-9f83235cf37e@2ndquadrant.com> Date: Thu, 6 Oct 2016 06:50:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:46.0) Gecko/20100101 Thunderbird/46.0a2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hi, it seems e94568ecc10 has a pretty bad memory leak. A simple pgbench -i -s 300 allocates ~32GB of memory before it fails vacuum... set primary keys... ERROR: out of memory DETAIL: Failed on request of size 134184960. The relevant bit from the memory context stats: TupleSort main: 33278738504 total in 263 blocks; 78848 free (23 chunks); 33278659656 used regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers