Re: Remove query results from cache

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: André Volpato <andre(dot)volpato(at)ecomtecnologia(dot)com(dot)br>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Remove query results from cache
Date: 2007-05-23 19:10:48
Message-ID: 20070523191048.GE13250@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

André Volpato wrote:
> Hello,
>
> Is there any way to remove the results of certain query, from the memory
> cache ?
> I´m doing some performance tests, and I need the planner to make his
> work every time I run the statements, without changing them.
>
> Running vmstat, I can se the memory cache grows, and the planner do not
> 'forget' the results of any query until the cache reach 2 Gb (total box
> RAM) , or the server is rebooted.

Stop postmaster, unmount the filesystem, mount, restart postmaster. The
problem is not only Postgres' own cache, but the kernel cache as well,
which is why you need the unmount step.

Maybe remounting is good enough, but I'm not sure
mount -o remount /where/lies/data

--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marek Lewczuk 2007-05-23 19:37:22 the future of pljava development
Previous Message Martijn van Oosterhout 2007-05-23 19:10:11 Re: Performance