However, my machine looses between 500 M and 800 M in two weeks, and within that time, I restart pg only very few times, say 3-4 times. Does pg allocate other shmem blocks? If there is really a kernel memory problem in shmem, how can I loose so much memory?
This is the same thing I am seeing -- 500-1GB memory lost every two weeks -- and I don't restart pg at all. So, whatever is causing this is not due to pg restarts. I am running the same software as everyone else who has had this problem though: Apache, Postgres, and mod_perl on Linux (I know there's the guy seeing it on BSD also). As I mentioned on the mod_perl list, I'm seeing the loss on a machine with ~350 vhosted domains all running a mod_perl CMS: Apache 1.3.37 Postgres 7.4.9 Linux 2.6.12.6 mod_perl 1.29 However, I am not seeing any loss at all on another machine with ~100 vhosted domains running the same CMS, but with the following software: Apache 1.3.37 Postgres 7.4.13 Linux 2.6.16.27 mod_perl 1.29 I cannot be certain that it's not just due to the ligher load (100 vs 350 vhosts), but I have not seen a single MB of lost memory on the second machine, and am inclined to believe that the problem is fixed with that setup (aside from the kernel and postgres, the two machines are running the same software). Tonight I am going to upgrade postgres on the first machine and see if it makes any difference, but it'll be about a week before I know for sure if memory is still being lost (it's such a slow leak that you cannot tell with just a couple days).