Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] Can we Flush the Postgres Shared Memory ?

From: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: raghu ram <raghuchennuru(at)gmail(dot)com>, Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>, pgsql novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?
Date: 2011-05-03 14:14:27
Message-ID: BANLkTikA8m1z=NfBiWGOQRbScEemxfxPQg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-generalpgsql-novice
2011/5/3 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Tue, May 3, 2011 at 8:55 AM, Cédric Villemain
> <cedric(dot)villemain(dot)debian(at)gmail(dot)com> wrote:
>> 2011/5/3 Merlin Moncure <mmoncure(at)gmail(dot)com>:
>>>
>>> no it will not, or at least there is no guarantee it will be.  the
>>> only way to reset the buffers in that sense is to restart the database
>>> (and even then they might not be read from disk, because they could
>>> sit in the o/s cache).  to force a read from the drive you'd have to
>>> reboot the server, or at least shut it down and use a lot of memory
>>> for some other purpose.
>>
>> with linux, you can : "echo 3 > /proc/sys/vm/drop_caches" for the OS cache
>>
>
> yeah -- good point.  aside: does that also drop cache on the drive/raid card?

no -- good point too ! (damn! how SAN users will do...maybe EMC or
other are good enough to provide some control panel for that ? )

and as I read on the link provided by Tomas, it is better to issue a
'sync' before trying to drop cache (I do that sometime, but postgresql
flush its write before shutdown, so I expected the dirty pages in OS
cache not to be relative to postgresql files.)


-- 
Cédric Villemain               2ndQuadrant
http://2ndQuadrant.fr/     PostgreSQL : Expertise, Formation et Support

In response to

pgsql-novice by date

Next:From: Mark JohnsonDate: 2011-05-03 14:16:58
Subject: Re: Can we Flush the Postgres Shared Memory ?
Previous:From: Merlin MoncureDate: 2011-05-03 14:08:35
Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?

pgsql-admin by date

Next:From: Mark JohnsonDate: 2011-05-03 14:16:58
Subject: Re: Can we Flush the Postgres Shared Memory ?
Previous:From: Merlin MoncureDate: 2011-05-03 14:08:35
Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?

pgsql-general by date

Next:From: Mark JohnsonDate: 2011-05-03 14:16:58
Subject: Re: Can we Flush the Postgres Shared Memory ?
Previous:From: Merlin MoncureDate: 2011-05-03 14:08:35
Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group