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      
PostgreSQL Development, 24x7 Support, Training & Services

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to