Re: How i can empty the buffers of a db

From: Doug McNaught <doug(at)wireboard(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tourtounis Sotiris <tourtoun(at)csd(dot)uoc(dot)gr>, Josh Jore <josh(at)greentechnologist(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: How i can empty the buffers of a db
Date: 2002-08-02 20:06:44
Message-ID: m34red10vf.fsf@varsoon.wireboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Tourtounis Sotiris <tourtoun(at)csd(dot)uoc(dot)gr> writes:
> > I am sorry for my lack of good knowledge of English but i have previously
> > asked how during a session with the database server to empty the memory
> > buffers after any commited select/insert/delete in order to have an as
> > much as possible indicative execution time and explain facility for each
> > of them. Thank you for your willingness of help !!!
>
> Ah. In that case Josh's guess was right: you want to reboot the machine
> for each query. That's the only way AFAIK to flush the kernel's disk
> caches. Since Postgres relies on the kernel's disk buffering quite as
> much as its own buffering, just flushing Postgres' buffers wouldn't get
> you back to a standing start anyway.

Short of rebooting, you could umount and remount the partition that
$PGDATA lives on, if no other daemons are using it (and it's not your
root partition). At least on Linux, that'll flush out all the cached
blocks from that partition.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-08-02 20:09:55 Re: getpid() function
Previous Message rob 2002-08-02 19:59:43 design question - newbie