Re: Archiving and recovering pg_stat_tmp

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Sameer Thakur <samthakur74(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Archiving and recovering pg_stat_tmp
Date: 2013-06-26 05:43:44
Message-ID: CA+HiwqHwYekVwJpsUF-sM_AORu_hZMXV55a7u_TWGBQWLa2dkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 26, 2013 at 2:10 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-06-26 05:44:50 Re: Concatenate table name in Pl/Pgsql
Previous Message Adarsh Sharma 2013-06-26 05:31:56 Re: Concatenate table name in Pl/Pgsql