Re: [tiny doc fix] statistics are not retained across immediate shutdown - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [tiny doc fix] statistics are not retained across immediate shutdown
Date
Msg-id 20140201022821.GA31141@momjian.us
Whole thread Raw
In response to [tiny doc fix] statistics are not retained across immediate shutdown  ("Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>)
List pgsql-hackers
Applied.

---------------------------------------------------------------------------

On Wed, Sep  4, 2013 at 04:11:09AM +0000, Tsunakawa, Takayuki wrote:
> Hi,
> 
> In the following page, statistics are kept across server restarts:
> 
> http://www.postgresql.org/docs/current/static/monitoring-stats.html
> 
> "When the server shuts down, a permanent copy of the statistics data is stored in the global subdirectory, so that
statisticscan be retained across server restarts."
 
> 
> 
> However, statistics are not retained after immediate shutdown (pg_ctl stop -mi).  You may say "pg_ctl stop -mi is not
ashutdown but an abort, so the sentence is not wrong", but it's an "immediate shutdown" and one mode of shutdown.
 
> 
> I propose a tiny fix to clarify this.  Please find the attached patch.
> 
> I'd like this to be backported at least 9.2.  Thanks.
> 
> 
> Regards, Takayuki Tsunakawa

> diff -rpcd a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
> *** a/doc/src/sgml/monitoring.sgml    2013-06-25 03:55:41.000000000 +0900
> --- b/doc/src/sgml/monitoring.sgml    2013-09-03 16:12:05.000000000 +0900
> *************** postgres: <replaceable>user</> <replacea
> *** 185,193 ****
>      <filename>pg_stat_tmp</filename> by default.
>      For better performance, <varname>stats_temp_directory</> can be
>      pointed at a RAM-based file system, decreasing physical I/O requirements.
> !    When the server shuts down, a permanent copy of the statistics
>      data is stored in the <filename>global</filename> subdirectory, so that
> !    statistics can be retained across server restarts.
>     </para>
>   
>    </sect2>
> --- 185,195 ----
>      <filename>pg_stat_tmp</filename> by default.
>      For better performance, <varname>stats_temp_directory</> can be
>      pointed at a RAM-based file system, decreasing physical I/O requirements.
> !    When the server shuts down cleanly, a permanent copy of the statistics
>      data is stored in the <filename>global</filename> subdirectory, so that
> !    statistics can be retained across server restarts.  When recovery is
> !    performed at server start (e.g. after immediate shutdown, server crash,
> !    and point-in-time recovery), all statistics counters are reset.
>     </para>
>   
>    </sect2>

> 
> -- 
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers


--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Bugfix and new feature for PGXS
Next
From: Bruce Momjian
Date:
Subject: Re: Bugfix and new feature for PGXS