Re: BUG #12183: Memory leak in long running sessions - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12183: Memory leak in long running sessions
Date
Msg-id 31927.1418065320@sss.pgh.pa.us
Whole thread Raw
In response to BUG #12183: Memory leak in long running sessions  (valgog@gmail.com)
Responses Re: BUG #12183: Memory leak in long running sessions
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: valgog@gmail.com
Date:
Subject: BUG #12183: Memory leak in long running sessions
Next
From: Andrew Sackville-West
Date:
Subject: Re: regression, deadlock in high frequency single-row UPDATE