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

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1
Дата
Msg-id 20130523185629.GF15045@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на WARNING : pgstat wait timeout - stats_temp_directory - postgres 9.1  (Mathieu Guerin <mathieu.guerin64@gmail.com>)
Список 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



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

Предыдущее
От: Stefan Kaltenbrunner
Дата:
Сообщение: Re: gemulon.postgresql.org/gitmaster.postgresql.org
Следующее
От: Andres Freund
Дата:
Сообщение: Re: getting rid of freezing