From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | hmidi slim <hmidi(dot)slim2(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How clear the cache on postgresql? |
Date: | 2017-11-25 03:49:55 |
Message-ID: | CAMkU=1wGgZ499FAqRGbwU_j3NyHZRvt4Qu4=KZcM2_LKfpH1tg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2017-11-24 17:55 GMT+01:00 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> bricklen <bricklen(at)gmail(dot)com> writes:
>
> > If you are on a (non-production) *nix server you can use:
> > sync && echo 3 > /proc/sys/vm/drop_caches
>
> You would also need to restart the postmaster, to get rid of whatever
> is in Postgres' shared buffers.
>
And restart postgres first, otherwise the shutdown checkpoint will
repopulate
some of the buffers you just dropped via drop_caches.
On Fri, Nov 24, 2017 at 9:09 AM, hmidi slim <hmidi(dot)slim2(at)gmail(dot)com> wrote:
> I execute the command sync && echo 3 > /proc/sys/vm/drop_caches but I
> still got buffers hit added to that buffers read now.Why I got the buffers
> hit?
>
Please don't top post in this mailling list.
If the same buffer is accessed repeatedly in a query, then some of those
accesses will be from the cache even if it were completely cold to start
with.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-11-25 04:43:51 | Re: duplicate primary key |
Previous Message | John R Pierce | 2017-11-24 19:58:28 | Re: How clear the cache on postgresql? |