X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 4E8C39FC3BF for ; Sat, 26 Aug 2006 23:46:35 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 12695-06 for ; Sun, 27 Aug 2006 02:46:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id A80239FC3B6 for ; Sat, 26 Aug 2006 23:46:25 -0300 (ADT) Received: from alvh.no-ip.org (201-221-200-187.bk11-dsl.surnet.cl [201.221.200.187]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k7R2kJMB003308; Sat, 26 Aug 2006 19:46:24 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 2FAF0C2DC58; Sat, 26 Aug 2006 22:45:54 -0400 (CLT) Date: Sat, 26 Aug 2006 22:45:54 -0400 From: Alvaro Herrera To: George Pavlov Cc: pgsql-performance@postgresql.org Subject: Re: stats reset during pg_restore? Message-ID: <20060827024554.GD30132@alvh.no-ip.org> Mail-Followup-To: George Pavlov , pgsql-performance@postgresql.org References: <8C5B026B51B6854CBE88121DBF097A863CD6CA@ehost010-33.exch010.intermedia.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8C5B026B51B6854CBE88121DBF097A863CD6CA@ehost010-33.exch010.intermedia.net> User-Agent: Mutt/1.5.12-2006-07-14 X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Sat, 26 Aug 2006 19:46:24 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/412 X-Sequence-Number: 20597 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.