Re: pg_stat_tmp file

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Rodrigo Barboza <rodrigombufrj(at)gmail(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: pg_stat_tmp file
Date: 2013-05-06 10:32:53
Message-ID: CABUevEw7jJjrV2ccHdYhnHQSq+WdF1AQvA6EyzE-e0wckzX+WA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Fri, May 3, 2013 at 5:09 PM, Rodrigo Barboza <rodrigombufrj(at)gmail(dot)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/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rodrigo Barboza 2013-05-06 11:37:28 Re: pg_stat_tmp file
Previous Message Nghia Truong 2013-05-04 00:26:29 Re: Problem: pg_hba.conf is automatically rewritten every day