Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xy3ZR-0005o6-VP for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Dec 2014 19:02:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xy3ZR-0007E8-BC for pgsql-bugs@arkaria.postgresql.org; Mon, 08 Dec 2014 19:02:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xy3ZQ-0007Dz-Ef for pgsql-bugs@postgresql.org; Mon, 08 Dec 2014 19:02:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xy3ZM-0004Z0-QG for pgsql-bugs@postgresql.org; Mon, 08 Dec 2014 19:02:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id sB8J20QJ031928; Mon, 8 Dec 2014 14:02:00 -0500 From: Tom Lane To: valgog@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #12183: Memory leak in long running sessions In-reply-to: <20141208184618.2526.62775@wrigleys.postgresql.org> References: <20141208184618.2526.62775@wrigleys.postgresql.org> Comments: In-reply-to valgog@gmail.com message dated "Mon, 08 Dec 2014 18:46:18 +0000" Date: Mon, 08 Dec 2014 14:02:00 -0500 Message-ID: <31927.1418065320@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) 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 valgog@gmail.com writes: > We experience a situations, that some of the sessions (in our case the > oldest ones) do not give the memory back. You have not shown any evidence of an actual problem. In particular, if you are looking at ps RSS output and claiming that there's a leak, you are probably simply wrong. The output shown here looks like normal behavior of the RSS stat: it does not count shared memory pages for a particular process until that process has touched the individual pages. So the usual behavior of long-lived PG processes is that the reported RSS starts small and gradually grows until it includes all of shared memory ... and that looks like what you've got here, especially since the larger RSS numbers are pretty similar to the VSZ numbers which are nearly common across all the backends. If you had some individual processes with RSS/VSZ greatly exceeding your shared memory allocation, then I'd believe you had a leak problem. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs