Re: Stats Disappear After Minor Upgrade?

From: Don Seiler <don(at)seiler(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Stats Disappear After Minor Upgrade?
Date: 2017-08-16 01:50:37
Message-ID: CAHJZqBB-eH_pYQ-fVUi=cGGxqFngL_qw9jduoVJYWvLdMM4mVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Aug 15, 2017 at 5:50 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

>
> 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.
>

pg_ctl stop -m fast

That's how I've been doing it this whole while. My connotation is that
postgres "fast" shutdown equates to oracle's immediate shutdown, but
postgres "immediate" shutdown is akin to oracle's "shutdown abort". So fast
should be a safe, consistent shutdown that doesn't require crash recovery
after.

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.

Interesting, I'll have to read up on the difference here. I'm going to see
if I can get another clone made up and test again, being sure to get the
info before and after.

--
Don Seiler
www.seiler.us

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message bhawana mishra 2017-08-16 05:50:26 Issues while installing PostgreSQL 9.6 on SUSE linux from repository
Previous Message Tom Lane 2017-08-15 22:50:55 Re: Stats Disappear After Minor Upgrade?