public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Subject: Re: Add callbacks for fixed-numbered stats flush in pgstats
Date: Mon, 9 Sep 2024 11:20:54 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <Ztf938t7Wt4//[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<Ztf938t7Wt4//[email protected]>
On Wed, Sep 04, 2024 at 06:27:43AM +0000, Bertrand Drouvot wrote:
> Agree. The idea was to add an additional parameter (say "check_only") to the
> flush_fixed_cb. If this parameter is set to true then the flush_fixed_cb would
> do nothing (no flush at all) but return a boolean that would indicate if there
> is pending stats. In case it returns false, then we could avoid the clock check.
Hmm. It's the same thing in terms of logic, but I am not really
convinced that it is a good idea to mix a code path for a sanity check
with a code path dealing with the action, particularly considering
that there is the nowait option to think about in the flush callback
which would require one to think about 4 possible states rather than
two possibilities. So that's more error-prone for extension
developers, IMO.
At the end, I have used my original suggestions for the callbacks. If
there are voices in favor of something different, we still have a good
chunk of the development and beta cycle for that.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (7+ 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: Add callbacks for fixed-numbered stats flush in pgstats
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