pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Merlin Moncure <mmoncure@gmail.com>
To: raghu ram <raghuchennuru@gmail.com>
Cc: Raghavendra <raghavendra.rao@enterprisedb.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Cc: pgsql-general <pgsql-general@postgresql.org>
Cc: pgsql novice <pgsql-novice@postgresql.org>
Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?
Date: Tue, 3 May 2011 08:51:07 -0500
Message-ID: <BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinmZhDFg-PV5sztAYVLMm7Qm-+p7w@mail.gmail.com>
References: <BANLkTikKE-iZQ3u_Voevgr2EpPFYjb2yng@mail.gmail.com>
	<BANLkTikUYxYXUv-FsDQtN0CYiqkJ1BorXw@mail.gmail.com>
	<BANLkTi=VtowCtuQTmjmnTiEk7mYAY8X2dw@mail.gmail.com>
	<BANLkTinmZhDFg-PV5sztAYVLMm7Qm-+p7w@mail.gmail.com>

On Tue, May 3, 2011 at 8:30 AM, raghu ram <raghuchennuru@gmail.com> wrote:
> On Tue, May 3, 2011 at 6:01 PM, Raghavendra
> <raghavendra.rao@enterprisedb.com> wrote:
>>
>> On Tue, May 3, 2011 at 5:37 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
>>>
>>> On Tue, May 3, 2011 at 11:54 AM, raghu ram <raghuchennuru@gmail.com>
>>> wrote:
>>>
>>> > It may be a silly question, still out of curiosity I want to know, is
>>> > there
>>> > any possible way to flush the Postgres Shared Memory without restarting
>>> > the
>>> > cluster.
>>> > In Oracle, we can flush the SGA, can we get the same feature here..
>>> > Thanks in Advance.
>>>
>>>
>>> The CHECKPOINT command will do this for you.
>>
>>
>
> According to PostgreSQL documentation, whenever you execute "CHECKPOINT" in
> the database,it will flush the modified data files presented in the Shared
> Buffers retuned to the Disk.
>            http://www.postgresql.org/docs/9.0/static/sql-checkpoint.html
> Is this clears the entire shared memory cache and same time,if i execute
> fresh SQL statement, Data will be retuned from disk??

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.

merlin



view thread (18+ messages)  latest in thread

Message-ID: <BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com>
Permalink:  ../BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com/
Also on:    postgresql.org/message-id/BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mmoncure@gmail.com, raghuchennuru@gmail.com, raghavendra.rao@enterprisedb.com, simon@2ndquadrant.com, pgsql-general@postgresql.org, pgsql-novice@postgresql.org
  Subject: Re: [GENERAL] Can we Flush the Postgres Shared Memory ?
  In-Reply-To: <BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com>
  References: <BANLkTikKE-iZQ3u_Voevgr2EpPFYjb2yng@mail.gmail.com> <BANLkTikUYxYXUv-FsDQtN0CYiqkJ1BorXw@mail.gmail.com> <BANLkTi=VtowCtuQTmjmnTiEk7mYAY8X2dw@mail.gmail.com> <BANLkTinmZhDFg-PV5sztAYVLMm7Qm-+p7w@mail.gmail.com> <BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox