On Wed, Jun 26, 2013 at 2:10 PM, Jeff Janes <jeff.janes@xxxxxxxxx> 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general