Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot - Mailing list pgsql-bugs

From Kyotaro Horiguchi
Subject Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot
Date
Msg-id 20230428.150628.727832009396744479.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: BUG #17903: There is a bug in the KeepLogSeg()