Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 831572E00CF for ; Wed, 30 Jan 2008 05:54:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 10578-03 for ; Wed, 30 Jan 2008 05:53:56 -0400 (AST) Received: from agent.zlutazimnice.cz (agent.zlutazimnice.cz [87.236.196.115]) by postgresql.org (Postfix) with ESMTP id 261762E00BD for ; Wed, 30 Jan 2008 05:54:00 -0400 (AST) Received: from localhost (localhost.zlutazimnice.cz [127.0.0.1]) by agent.zlutazimnice.cz (Postfix) with ESMTP id 1895C6EEA9 for ; Wed, 30 Jan 2008 10:54:51 +0100 (CET) X-Virus-Scanned: amavisd-new at zlutazimnice.cz Received: from agent.zlutazimnice.cz ([127.0.0.1]) by localhost (agent.zlutazimnice.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Nt5UBtUKrS8N for ; Wed, 30 Jan 2008 10:54:46 +0100 (CET) Received: from localhost.localdomain (unknown [89.233.175.62]) by agent.zlutazimnice.cz (Postfix) with ESMTP id B25096EEA7 for ; Wed, 30 Jan 2008 10:54:46 +0100 (CET) Message-ID: <47A0490D.4020301@developers.zlutazimnice.cz> Date: Wed, 30 Jan 2008 10:53:17 +0100 From: Honza Novak User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: connection from connection pool uses too much memory during the time Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/285 X-Sequence-Number: 28059 Hello, I've come across this problem: We have some tomcats connecting to postgresql database using connection pools, which means, that connection gets open while tomcat first uses it and then stays open, until we stop tomcat. So far everything is fine, connection pooling works nicely. But. We have some complex queries, that probably use n times allowed work_mem. It is still not problem for us. The problem is that it looks like, that once the open connection takes some memory, it never gives that memory back, which ends up with our server swapping large amounts of memory. Am i right or wrong with my assumption? Can i somehow force open connection to release its memory? (connection is in the idle state most of the time). Any other hints? Thank you, Honza Novak