Re: BUG #3680: memory leak when excuting a SQL "selectcount(id) from chinatelecom; "

From: "ssurui" <ssurui(at)mailst(dot)xjtu(dot)edu(dot)cn>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #3680: memory leak when excuting a SQL "selectcount(id) from chinatelecom; "
Date: 2007-10-18 01:04:05
Message-ID: 00f701c81122$c7720dc0$2300a8c0@ssuruieda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thank you for the explanations.
My program is running 4 months, it has never exit because of the shortage of
memory. But the 'free' memory (observing by top command) is kept on about
20MB (The database server has 2GB DDR RAM).

According to you explanations, when I "malloc" a buffer of 30MB, the cache
will be reduced to give me 30MB. I think it is true. So another question is
whether the efficiency of program is affected to go down?
ssurui(at)mailst(dot)xjtu(dot)edu(dot)cn




----------------------------------------------------------------------------
------------------------------------------------------------------
I think the one thing everyone knows as a fact is that the memory did not
vanish. Your latest message gives us a clue that what interests you is why
free (unused, idle, not giving you any benefit) memory went down. If that
is the question, it is because PostgreSQL goes through the OS file systems,
so RAM which is serving no other purpose will automatically be used to cache
data. If you need memory for something else, the cache will be reduced to
compensate.

-Kevin


Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Douglas Toltzman 2007-10-18 01:17:55 Re: BUG #3680: memory leak when excuting a SQL "selectcount(id) from chinatelecom; "
Previous Message Kevin Grittner 2007-10-17 17:35:23 Re: BUG #3680: memory leak when excuting a SQL "select count(id) from chinatelecom;"