Re: No stats after promoting standby?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: No stats after promoting standby?
Дата
Msg-id 20171204220231.ywcqohbn47t5nha5@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: No stats after promoting standby?  (Don Seiler <don@seiler.us>)
Ответы Re: No stats after promoting standby?  (Don Seiler <don@seiler.us>)
Список pgsql-admin
Don Seiler wrote:
> On Mon, Dec 4, 2017 at 3:37 PM, Adrien Nayrat <adrien.nayrat@dalibo.com>
> wrote:
> >
> > Stats are deleted after promotion :
> > " The stats file is deleted at the start of recovery, so stats from
> > primary and
> > standby will differ; this is considered a feature, not a bug."
> > https://www.postgresql.org/docs/current/static/hot-standby.html

> OK good to know. Interesting point but I think I disagree about the standby
> having its own stats. Until replication is broken, wouldn't the data be
> identical to the primary, and so the statistics should be identical as well?

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

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.

This seems pretty difficult to implement, though; as far as I know we
haven't even discussed it.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


В списке pgsql-admin по дате отправления:

Предыдущее
От: Don Seiler
Дата:
Сообщение: Re: Former Standby Wants to Archive Old WAL files?
Следующее
От: Don Seiler
Дата:
Сообщение: Re: No stats after promoting standby?