How to clear buffer

Started by Ravi Krishnaalmost 11 years ago3 messagesgeneral
Jump to latest
#1Ravi Krishna
s.ravikrishna@aim.com

I am writing bench mark scripts and as part of it would like to clear the cache
programmatically. This is to ensure that when we run select queries the data is
not read read from the cache. Does PG provide any easy way to do it other than
the obvious way to restart the database.

Thanks.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Gavin Flower
GavinFlower@archidevsys.co.nz
In reply to: Ravi Krishna (#1)
Re: How to clear buffer

On 13/05/15 20:13, Ravi Krishna wrote:

I am writing bench mark scripts and as part of it would like to clear the cache
programmatically. This is to ensure that when we run select queries the data is
not read read from the cache. Does PG provide any easy way to do it other than
the obvious way to restart the database.

Thanks.

Don't forget the O/S also caches things!

-Gavin

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Pete Hollobon
postgres@hollobon.com
In reply to: Ravi Krishna (#1)
Re: How to clear buffer

I wrote a few notes on doing this here:
http://hollobon.com/_pgblog/clear_shared_buffers.html

Thanks,
Pete.

On 13 May 2015 at 09:13, Ravi Krishna <s.ravikrishna@aim.com> wrote:

Show quoted text

I am writing bench mark scripts and as part of it would like to clear the
cache
programmatically. This is to ensure that when we run select queries the
data is
not read read from the cache. Does PG provide any easy way to do it other
than
the obvious way to restart the database.

Thanks.

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general