Re: [tiny doc fix] statistics are not retained across immediate shutdown

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [tiny doc fix] statistics are not retained across immediate shutdown
Date: 2014-02-01 02:28:21
Message-ID: 20140201022821.GA31141@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 statistics can 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 a shutdown 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2014-02-01 02:28:55 Re: Bugfix and new feature for PGXS
Previous Message Andrew Dunstan 2014-02-01 02:28:06 Re: Bugfix and new feature for PGXS