Re: No stats after promoting standby?

From: Don Seiler <don(at)seiler(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: No stats after promoting standby?
Date: 2017-12-04 22:11:23
Message-ID: CAHJZqBDTY45Fqe7DfMDCfPq3rvfRHu2OQYTgaZ8M0_EV-QOSYg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Mon, Dec 4, 2017 at 4:02 PM, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
wrote:

> Those stats aren't part of regular data, so no they shouldn't.
>

I would consider object statistics to be part of a database, and a very
important part at that.

> The docs are telling half the truth when they say this is a
> not-bug-but-feature, though. It's true that we don't want to overwrite
> some of these counters, such as number of scans, number of tuples
> accessed, etc; but ideally we should keep things such as vacuum/analyze
> counts and last times, and also the counts of dead/live/
> mod_since_analyze tuples, to keep autovacuum informed without requiring
> an ANALYZE.
>

I'm not so worried about the time of last vacuum or analyze but the
statistics for optimizer usage would be necessary. Otherwise I would think
the time to complete a failover would have to include that "vacuumdb --all
--analyze-only" run as queries run before that could be very out-of-sorts
with no information on the data. Although perhaps I'm misunderstanding
where the optimizer gets its information from and these pg_stat_% tables
are not what I seem to think they are.

Anyway, sounds like you've all been over this one before. I'll just make a
note of it for my own reference for now.

Don.

--
Don Seiler
www.seiler.us

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Alvaro Herrera 2017-12-04 22:36:47 Re: No stats after promoting standby?
Previous Message Alvaro Herrera 2017-12-04 22:02:31 Re: No stats after promoting standby?