On Wed, 6 Sep 2006 17:36:50 -0400
Jonathan Vanasco wrote:

> From what I can tell, this is happening:
> bootup: ( pg ) 861 Free
> apache start: ( apache , pg , 3x pg clients ) 785 Free
> apache stop: ( pg, 3x pg clients ) 840 Free
> apache start: ( apache , pg , 3x pg clients ) 774 Free
> apache stop: ( pg, 3x pg clients ) 829 Free
> apache start: ( apache , pg , 3x pg clients ) 773 Free
> apache stop: ( pg, 3x pg clients ) 829 Free
>
> Note: the large drop in free memory is correlated to an
> equal increase in Pg's shared memory- so i'm not worried about that.
> Yet.
>
> pg stop: 833 free
>
> oh, wait. whats's that? i killed all those pg connections
> and no shared memory was shared? what the...
>
> ugh... lets check with ipcs?
>
> nope, no shared mem for postgres found. that stuff just
> disappeared


It didn't disappear, and it isn't "shared" like the type of sharing
we talk about with mod_perl/Apache. It's not CoW sharing.

The shared memory you're talking about here is held by the postmaster
daemon and is used to store frequently requested data to be used by
the forked children via SysV IPC.

And yeah, PostgreSQL cleans up it's shared memory when it exits like
it should.

---------------------------------
Frank Wiles
http://www.wiles.org
---------------------------------