pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Don Seiler <don@seiler.us>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Stats Disappear After Minor Upgrade?
Date: Tue, 15 Aug 2017 18:50:55 -0400
Message-ID: <7374.1502837455@sss.pgh.pa.us> (raw)
In-Reply-To: <CAHJZqBAQNLK1xa3pRqr9f7qUCaHqKJ9r_4Ymu1J_jSTQQw26iA@mail.gmail.com>
References: <CAHJZqBAQNLK1xa3pRqr9f7qUCaHqKJ9r_4Ymu1J_jSTQQw26iA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

Don Seiler <don@seiler.us> 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



view thread (3+ messages)  latest in thread

Message-ID: <7374.1502837455@sss.pgh.pa.us>
Permalink:  ../7374.1502837455@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7374.1502837455@sss.pgh.pa.us

 · 

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, don@seiler.us
  Subject: Re: Stats Disappear After Minor Upgrade?
  In-Reply-To: <7374.1502837455@sss.pgh.pa.us>

* 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