Thread: psql/postmaster not freeing up resources? (based on "top" command)

psql/postmaster not freeing up resources? (based on "top" command)

From
Ludwig Lim
Date:
Hi:

   I was monitoring the time to perform  a complicated
query in psql using "top" command with "s 1" switch.
So the screen is always refreshed after 1 second.

   Initially the following state of the psql/postmster
before I started the query

Size  RSS   Share  State %CPU  %Mem  time Command
3872  3872  3368     S    0    .1    0.0  postmaster

Sometime after the query has finished executing."top"
reported the following state

Size   RSS   Share  State %CPU  %Mem  time  command
11724  11M   11072   S     0    .5    4:27  postmaster

  Isn't it suppose to revert back to its orginal state
after the query? I tried to execute a query on a very
small table to see if the settings would change, yet
the settings does not change.

    Any idea on this phenomemon?

thank you in advance,
ludwig

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com

Re: psql/postmaster not freeing up resources? (based on "top" command)

From
Tom Lane
Date:
Ludwig Lim <lud_nowhere_man@yahoo.com> writes:
>   Isn't it suppose to revert back to its orginal state
> after the query?

No.  On most Unixen, free() doesn't ever release memory to the OS.

            regards, tom lane