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

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: [GENERAL] [ADMIN] Can we Flush the Postgres Shared Memory ?
Дата
Msg-id BANLkTin1Vn82yDaALCVuH57NjjFurri73Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [ADMIN] Can we Flush the Postgres Shared Memory ?  (raghu ram <raghuchennuru@gmail.com>)
Ответы Re: [GENERAL] [ADMIN] Can we Flush the Postgres Shared Memory ?  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
Список pgsql-novice
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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Sébastien D'Errico
Дата:
Сообщение: create a database with encoding LATIN1
Следующее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: [GENERAL] [ADMIN] Can we Flush the Postgres Shared Memory ?