public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Improve pg_stat_statements scalability
Date: Thu, 4 Jun 2026 13:50:59 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CAA5RZ0uoxiQ2_=xHGRnyc4WdM9aR0fzdMhBubnw97po==--yGQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
On Wed, Jun 03, 2026 at 05:10:39PM +0900, Kyotaro Horiguchi wrote:
> One alternative would be to introduce a separate callback for anytime
> flushes. However, since transaction-boundary flushes ultimately need
> to flush everything anyway, it seems to me that passing a context flag
> would be sufficient.
Nah. I am not really in favor of an extra callback. I feel that this
could lead to more mistakes when implementing new stats kinds, so
doing your approach of using a value based on the context of the flush
works for me.
> I tend to agree with the single-entry-point approach.
>
> The basic operation is common; the anytime case differs only in the
> context in which the flush is requested. The flush-timing logic in
> pgstat_report_stat() may become slightly more complicated with anytime
> flushes, but after that point I think the existing path should
> continue to work with only minor adjustments, by carrying an explicit
> context value down to the callbacks.
Yeah, same feeling here. That would be the way I'd use to approach
this design, and to aim for one single entry point for all the stats
reports and the flushes, for all the contexts.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, 2-signature.asc)
download
view thread (12+ messages)
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Improve pg_stat_statements scalability
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox