Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhkfs-0000lX-Qp for pgsql-admin@arkaria.postgresql.org; Tue, 15 Aug 2017 22:51:00 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dhkfs-0000Zz-40 for pgsql-admin@arkaria.postgresql.org; Tue, 15 Aug 2017 22:51:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dhkfr-0000Zc-DX for pgsql-admin@postgresql.org; Tue, 15 Aug 2017 22:50:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dhkfo-0006jL-Ek for pgsql-admin@postgresql.org; Tue, 15 Aug 2017 22:50:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v7FMotud007375; Tue, 15 Aug 2017 18:50:55 -0400 From: Tom Lane To: Don Seiler cc: pgsql-admin Subject: Re: Stats Disappear After Minor Upgrade? In-reply-to: References: Comments: In-reply-to Don Seiler message dated "Tue, 15 Aug 2017 16:49:29 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7373.1502837455.1@sss.pgh.pa.us> Date: Tue, 15 Aug 2017 18:50:55 -0400 Message-ID: <7374.1502837455@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Don Seiler writes: > I'm testing an upgrade of a database from 9.2.10 to 9.2.22. The upgrade > seemingly had no problems and I started the DB. However when I went to look > at some vacuum-related status, every table had n_dead_tup and n_live_tup = > 0. How did you shut down the existing installation? This'd be expected if you used "--mode immediate". Otherwise, I'd have thought those stats would still be there. > For what it's worth, this DB was a clone of a prod standby. I didn't think > to check the stats after opening the new clone (renamed the recovery.conf), > so I can't say for sure what it looked like prior to upgrade. I've kicked > off a DB-wide analyze but obviously that takes a long time and more or less > would mean prod app downtime as the optimizer would make all sorts of goofy > decisions until the stats are in place. The optimizer's decisions are generally not based on the stats collector's info, but on the contents of pg_statistic. This observation doesn't prove anything about whether that was intact ... but I'd be really surprised if it wasn't. regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin