pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot
Date: Fri, 24 Feb 2023 19:00:00 +0300
Message-ID: <1836967a-9f78-aed8-1ff1-3351c504e8f0@gmail.com> (raw)
In-Reply-To: <20230224.160812.1001813717917457753.horikyota.ntt@gmail.com>
References: <17804-2a118cd046f2d0e5@postgresql.org>
	<20230224.160812.1001813717917457753.horikyota.ntt@gmail.com>

Hello Kyotaro-san,
24.02.2023 10:08, Kyotaro Horiguchi wrote:
> Thanks for the report!  We didn't consider the case that variable is
> changed in-transaction.
>
>
> What are your thoughts on this?
What if we implement assign_pgstat_fetch_consistency() and execute
pgstat_clear_snapshot() in it when the mode switch happens (to avoid
possible inconsistency between the GUC and the current pgstat state)?
If snapshots in different modes contain different data sets, will such
behaviour be unexpected for a user?
For example, if a user performs:
SET LOCAL stats_fetch_consistency = snapshot;
{some-actions-1}
SET LOCAL stats_fetch_consistency = none;
{some-actions-2}
SET LOCAL stats_fetch_consistency = snapshot;
{some-actions-3}
Should she expect that some-actions-1, some-actions-2 will be
reflected in the snapshot at the end?

Best regards,
Alexander





view thread (14+ messages)  latest in thread

Message-ID: <1836967a-9f78-aed8-1ff1-3351c504e8f0@gmail.com>
Permalink:  ../1836967a-9f78-aed8-1ff1-3351c504e8f0@gmail.com/
Also on:    postgresql.org/message-id/1836967a-9f78-aed8-1ff1-3351c504e8f0@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: exclusion@gmail.com, horikyota.ntt@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17804: Assertion failed in pg_stat after fetching from pg_stat_database and switching cache->snapshot
  In-Reply-To: <1836967a-9f78-aed8-1ff1-3351c504e8f0@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox