Re: WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Mathieu Guerin <mathieu(dot)guerin64(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1
Date: 2013-05-23 18:56:30
Message-ID: 20130523185629.GF15045@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mathieu Guerin escribió:
> Hello,
>
> I am facing a problem with pgstat as my subject says. I known, some topics
> are open about that, but I would like to go deeper.
>
> Some person told that the better way to don't have this message anymore is
> to configure pgstat.stat to be loaded in the RAM with a tmpfs mount point.
>
> What are the consequences ? Because this file will be remove if the server
> reboot.

There are two separate files, one is the temp file which is used while
the server is running and is written very frequently. You put that one
on volatile storage (stats_temp_directory) and immediately see a
performance benefit.

The other one is the permanent file, which is written only once when the
system is shutting down. This is not put in stats_temp_directory, so
it's safe.

In case of a crash (the server didn't have the chance to write the
permanent file), stats would be reset anyway at restart, so there's no
conceptual problem with the permanent file not being written.

> If we change the parameter stats_temp_directory is it necessary to reboot
> the server ?

No, a reload (pg_ctl reload) is sufficient.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-05-23 19:03:29 Re: getting rid of freezing
Previous Message Stefan Kaltenbrunner 2013-05-23 18:21:29 Re: gemulon.postgresql.org/gitmaster.postgresql.org