pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: George Pavlov <gpavlov@mynewplace.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: stats reset during pg_restore?
Date: Sat, 26 Aug 2006 22:45:54 -0400
Message-ID: <20060827024554.GD30132@alvh.no-ip.org> (raw)
In-Reply-To: <8C5B026B51B6854CBE88121DBF097A863CD6CA@ehost010-33.exch010.intermedia.net>
References: <8C5B026B51B6854CBE88121DBF097A863CD6CA@ehost010-33.exch010.intermedia.net>

George Pavlov wrote:
> This did not have any takers in pgsql-general. Maybe
> performance-oriented folks can shed light? The basic question is if
> there is a way to preserve stats during pg_restore?

No, there isn't.

> Can someone share what exatly happens with stats upon restore? Also is
> there anything one can do to keep them intact during a dump/restore? 

These stats are not stored in tables, only in memory and saved to a
special file on disk to be able to preserve it across server stop/start.
But pg_dump does not make the slightest attempt to save it.

Also, you can't save it yourself -- while you could save the values it
returns on queries to the stats views, there is no way to feed those
saved values back to the system after a dump/restore.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.



view thread (4+ messages)  latest in thread

Message-ID: <20060827024554.GD30132@alvh.no-ip.org>
Permalink:  ../20060827024554.GD30132@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20060827024554.GD30132@alvh.no-ip.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: alvherre@commandprompt.com, gpavlov@mynewplace.com
  Subject: Re: stats reset during pg_restore?
  In-Reply-To: <20060827024554.GD30132@alvh.no-ip.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox