Re: Remove query results from cache - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Remove query results from cache
Date
Msg-id 20070523191048.GE13250@alvh.no-ip.org
Whole thread Raw
In response to Remove query results from cache  (André Volpato<andre.volpato@ecomtecnologia.com.br>)
List 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.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Performance
Next
From: Andrew Sullivan
Date:
Subject: Re: Integrity on large sites