From: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> |
---|---|
To: | andres(at)anarazel(dot)de |
Cc: | melanieplageman(at)gmail(dot)com, ibrar(dot)ahmad(at)gmail(dot)com, masao(dot)fujii(at)oss(dot)nttdata(dot)com, gkokolatos(at)protonmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: shared-memory based stats collector - v67 |
Date: | 2022-03-24 06:00:58 |
Message-ID: | 20220324.150058.1602791294006974233.horikyota.ntt@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
(nice work about ubsan)
At Wed, 23 Mar 2022 10:42:03 -0700, Andres Freund <andres(at)anarazel(dot)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(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2022-03-24 06:17:46 | Re: PG DOCS - logical replication filtering |
Previous Message | Andres Freund | 2022-03-24 05:33:29 | Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset |