Re: shared-memory based stats collector - v67

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: shared-memory based stats collector - v67
Дата
Msg-id 20220324.150058.1602791294006974233.horikyota.ntt@gmail.com
обсуждение исходный текст
Список pgsql-hackers
(nice work about ubsan)

At Wed, 23 Mar 2022 10:42:03 -0700, Andres Freund <andres@anarazel.de> wrote in 
> Hi,
> 
> On 2022-03-23 17:27:50 +0900, Kyotaro Horiguchi wrote:
> > At Mon, 21 Mar 2022 14:30:17 -0700, Andres Freund <andres@anarazel.de> wrote in 
> > Before there, InitWalRecovery changes the state to
> > DB_IN_ARCHIVE_RECOVERY if it was either DB_SHUTDOWNED or
> > DB_IN_PRODUCTION. So the stat seems like always discarded on standby.
> 
> Hm. I though it worked at some point. I guess there's a reason this commit is
> a separate commit marked WIP ;)

Yeah, I know:p

> > In the first place, I'm not sure it is valid that a standby from a
> > cold backup takes over the stats from the primary.
> 
> I don't really see a reason not to use the stats in that case - we have a
> correct stats file after all. But it doesn't seem too important. What I
> actually find worth addressing is the case of standbys starting in
> DB_SHUTDOWNED_IN_RECOVERY. Right now we always throw stats away after a
> *graceful* restart of a standby, which doesn't seem great.

It undoubtfully an improvement if stats preserved after a graceful
restart on standbys.  I just wonder if there's way to detect the
first-start of a standby from a cold backup.  But even if there isn't,
it's an improvement.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset
Следующее
От: Peter Smith
Дата:
Сообщение: Re: PG DOCS - logical replication filtering