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

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2023-04-28T06:48:16Z
Lists: pgsql-bugs
On Fri, Apr 28, 2023 at 03:04:04PM +0900, Kyotaro Horiguchi wrote:
> Just I wanted not to do that much in the guc callback including memory
> context operations. If it is compeltly safe, I don't object just
> clearing snapshots in the callback.

I vaguely recalled some memory context deletions done in one of the
assign callbacks, like the one for the plan resets, but it doesn't
seem to be the case, looking closely..  Hm.
--
Michael

Commits

  1. Fix assertion failure when updating stats_fetch_consistency in a transaction

  2. Document values of stats_fetch_consistency in postgresql.conf.sample