At Fri, 28 Apr 2023 15:04:04 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in
> At Fri, 28 Apr 2023 13:37:23 +0900, Michael Paquier <michael@paquier.xyz> wrote in
> > FWIW, I was looking at this patch and this proposal of relying on a
> > static flag to conditionally clear a snapshot looks rather brittle by
> > design to me because this relies on quite a few assumptions that the
> > snapshot will always be cleared when necessary, as proved by the two
> > code paths of pgstat.c patched where each gain a check on
>
> pgstat_get_stat_snapshot_timestmp() necessarily requires that. Just
Sorry, this is actually the opposite.
pgstat_get_stat_snapshot_timestmp() doesn't necessarily requires that. Just
> for seeming consistency. The only significant part is
> gstat_prep_snapshot, which is always called when the caller wants a
> snapshot.
Regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center