Re: Archiving and recovering pg_stat_tmp - Mailing list pgsql-general

From Amit Langote
Subject Re: Archiving and recovering pg_stat_tmp
Date
Msg-id CA+HiwqHwYekVwJpsUF-sM_AORu_hZMXV55a7u_TWGBQWLa2dkg@mail.gmail.com
Whole thread Raw
In response to Re: Archiving and recovering pg_stat_tmp  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general
On Wed, Jun 26, 2013 at 2:10 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> On Wednesday, June 19, 2013, Sameer Thakur wrote:
>>
>> Hello,
>> I was trying to figure out how does one recover server statistics to the
>> same snapshot to which a database is restored after PITR.
>
>
> Do you think that it is important to do so?  Are you experiencing problems
> which you believe are due to missing/out of date activity statistics?  Or is
> this more for curiosity?
>

In fact, I too am curious if there exists a way to recover?
Assuming statistics referred to by *.stats files are more of
statistics about database operation like blocks read, blocks hit, etc.
and NOT the statistics about data like relpages, reltuples, histogram,
null fractions, etc. (which may be of interest to planner), they are
not tracked by WAL logging, right?

As far as I can tell, using a periodic stats reporting tool (like
pg_statsinfo) would be the only way to preserve such historic
(snapshots-like) information about those statistics. Server itself
doesn't have any mechanism to preserve any historical information like
those stats, am I right in saying that?


--
Amit Langote


pgsql-general by date:

Previous
From: Adarsh Sharma
Date:
Subject: Re: Concatenate table name in Pl/Pgsql
Next
From: Ian Lawrence Barwick
Date:
Subject: Re: Concatenate table name in Pl/Pgsql