Re: pg_stat_tmp file - Mailing list pgsql-admin

From Magnus Hagander
Subject Re: pg_stat_tmp file
Date
Msg-id CABUevEw7jJjrV2ccHdYhnHQSq+WdF1AQvA6EyzE-e0wckzX+WA@mail.gmail.com
Whole thread Raw
In response to pg_stat_tmp file  (Rodrigo Barboza <rodrigombufrj@gmail.com>)
Responses Re: pg_stat_tmp file  (Rodrigo Barboza <rodrigombufrj@gmail.com>)
List pgsql-admin
On Fri, May 3, 2013 at 5:09 PM, Rodrigo Barboza <rodrigombufrj@gmail.com> wrote:
> Hi, guys.
> Postgres doc says it is better to place the pgstat.stat file in ram disk.
> And it says that at shutdown, it is copied to global.
> What happens if postgres do not shutdown the usual way?
> If machine loses power, for example...

PostgreSQL always discards the statistics file on an unclean shutdown,
such as a powerloss, regardless of where it's stored. Therefor, it's
not a problem that it's stored on a ramdrive. This is because it
cannot be guaranteed to be consistent in that case.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-admin by date:

Previous
From: Nghia Truong
Date:
Subject: Re: Problem: pg_hba.conf is automatically rewritten every day
Next
From: Rodrigo Barboza
Date:
Subject: Re: pg_stat_tmp file