Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V4YjR-00051g-Mn for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Jul 2013 15:54:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V4YjR-0001a0-6Y for pgsql-bugs@arkaria.postgresql.org; Wed, 31 Jul 2013 15:54:33 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V4YjQ-0001Zu-Aq for pgsql-bugs@postgresql.org; Wed, 31 Jul 2013 15:54:32 +0000 Received: from nm16.bullet.mail.bf1.yahoo.com ([98.139.212.175]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V4YjM-0003oT-JU for pgsql-bugs@postgresql.org; Wed, 31 Jul 2013 15:54:31 +0000 Received: from [66.196.81.171] by nm16.bullet.mail.bf1.yahoo.com with NNFMP; 31 Jul 2013 15:54:27 -0000 Received: from [98.139.212.193] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 31 Jul 2013 15:54:27 -0000 Received: from [127.0.0.1] by omp1002.mail.bf1.yahoo.com with NNFMP; 31 Jul 2013 15:54:27 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 641398.78735.bm@omp1002.mail.bf1.yahoo.com Received: (qmail 21641 invoked by uid 60001); 31 Jul 2013 15:54:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s1024; t=1375286067; bh=l+kvX6g1/5JR/lJ45hIiRmRqRHIlJsVMx8pXuABKGwg=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=e4w+1SWnw6WRPvwyYqxmWLPUFyy/xMWAFEaYdivs7hkxMc8NyCLxAQ9Ts/qjGB3vlxYziL7rw1NNKXuZRMi7bdKIPa1ihJzMsa/Q8lXlo26O93kRP8oxg+ahtk6Czmo+00iRKKOFfjiWmrq5AiiiCQY4vxuYC/d9UxNOfa76vuI= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=ymail.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=t9w+Sp+XQ374Ml5KENNrbVbkgRFbyjQulQ6tQkzN9WmzY8msI8HGjL+PlFBq5tADLroy0hE4sV2O8YJ8O7zEBf4kusqOdXZErkS7iuRiG19NS46qVCFZxBz95ylR7MkMAzLhMaABkJoaHMitjiM6+NRrP18r2LEv1WuIZ3i8eQY=; X-YMail-OSG: bxcL1IAVM1n6xy3puDOZCS_iKZQF0xi80pO8FOBhTFhG4LE WsqXMRmu1JHBU18m3jvNs1ZomMCPVtyErrPvM4_QrjEZnXECvV2q2bClimAS YngVB1OqyNBb3ZMTTZaD1XmqHRcvGv1GvRkrA.krO3Wkoc2H2xYO_nc.pGyJ 5E7PVtfxNENVmFWksgRifetlTGNrcmhbwDsuRv.9B1xdFZaTmtGErKd8e.ZA KqA3DHH2WGBRUmYgt_yOkCDLXQaGWUqsUCPUtbLrUCNCrsabHpcXsnPRFXKE 9rKC01yp72dbdenryCMHtjxlB_7ZHllaqSr7f03sE9mV9xgOJJhs9_oFWV_y n7UIpQwCQq2utyjxurwqwzEmWHImPOE_zAcRpq09s8UEjvVfA0bKt.KmiSFg PvT8_c1ALnqsZRpuWbGQ_npAiAXv5PZC1poyLWyfu73Atcc1WqrzVhKtD60p ZTF_TsVV1B_QjlvPC5RukhDkN6io8F96dR54igRgwth0JLHVe8P_evS03Tym 0jfmrTI3uam09BJFGFYs9EpmXdpAa8SdZiOOsDnAcwTx.gGr._tSL.a48wxA q2RieM_5NbsnEbQhfNGHr30cwTJZim6kdJj89HDpc1Py6SbcPnmU_e_Og1GR xst8O._X6DF.7nUyy9IyZniyNvnkPKhzMAzBt8StX.7_.GIq4tvu8Om4zV8C elcDC.P5fsQ2tIX4PwmEKIGsaqVTmSfJDOpLUtA-- Received: from [76.255.18.237] by web162902.mail.bf1.yahoo.com via HTTP; Wed, 31 Jul 2013 08:54:27 PDT X-Rocket-MIMEInfo: 002.001, IkcuQmFrYWxhcnNraUBpY20uZWR1LnBsIiA8Ry5CYWthbGFyc2tpQGljbS5lZHUucGw.IHdyb3RlOgo.IEtldmluIEdyaXR0bmVyIDxrZ3JpdHRuQHltYWlsLmNvbT4gd3JvdGU6Cj4.ICJnLmJha2FsYXJza2lAaWNtLmVkdS5wbCIgPGcuYmFrYWxhcnNraUBpY20uZWR1LnBsPiB3cm90ZToKPj4KPj4.IFdoZW4gZG9pbmcgdGhlc2Uga2luZCBvZiBzdGF0ZW1lbnRzCj4.Cj4.PiBleGVjdXRlIDx1bm5hbWVkPjogQ1JFQVRFIFRFTVBPUkFSWSBUQUJMRSBbLi4uXQo.Pgo.Pj4gQWZ0ZXIgZmV3IGRheXMgWy4uLl0BMAEBAQE- X-Mailer: YahooMailWebService/0.8.151.566 References: <1375220280.46993.YahooMailNeo@web162905.mail.bf1.yahoo.com> <1e0b28053877c4a86f39784ed69d8514.squirrel@webmail.icm.edu.pl> Message-ID: <1375286067.18051.YahooMailNeo@web162902.mail.bf1.yahoo.com> Date: Wed, 31 Jul 2013 08:54:27 -0700 (PDT) From: Kevin Grittner Reply-To: Kevin Grittner Subject: Re: BUG #8318: memory leak during CREATE TEMPORARY TABLE To: "G.Bakalarski@icm.edu.pl" Cc: "pgsql-bugs@postgresql.org" In-Reply-To: <1e0b28053877c4a86f39784ed69d8514.squirrel@webmail.icm.edu.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: 0.7 (/) 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 "G.Bakalarski@icm.edu.pl" wrote: > Kevin Grittner wrote: >> "g.bakalarski@icm.edu.pl" wrote: >> >>> When doing these kind of statements >> >>> execute : CREATE TEMPORARY TABLE [...] >> >>> After few days [...] my huge server (192GB of RAM), gets stucked >>> due to no memory available (usually %commit is around 103-105%), >>> linux OOM killer goes into action - it usually kills one of >>> postgres processes - postmaster restart all databases) and after >>> all linux=A0 has again some 100GB of not commited memory >> >> What do you have as settings for temp_buffers and max_connections? >> > temp_buffers =3D 16GB > max_connections =3D 250 temp_buffers is per-connection, and any space allocated for this purpose by a connection is not released until the connection is closed.=A0 So you have configured your server to acquire and hold up to 3.9 TB of RAM for this purpose. http://www.postgresql.org/docs/current/static/runtime-config-resource.html#= RUNTIME-CONFIG-RESOURCE-MEMORY > (with real number of connections about 120 and not going above) OK, so you can only get to 1.9 TB of RAM used for temp_buffers with 120 connections, but that's still way more than the 192 GB you actually have. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs