public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Bertrand Drouvot <[email protected]>
Cc: Nazir Bilal Yavuz <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Subject: Re: per backend I/O statistics
Date: Wed, 20 Nov 2024 09:01:26 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <ZypXy3fH/[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Tue, Nov 19, 2024 at 04:28:55PM +0000, Bertrand Drouvot wrote:
> So, for the startup process only, what about?
>
> - don't call pgstat_create_backend_stat() in pgstat_beinit()...
> - but call it in StartupXLOG() instead (after the stats are discarded or restored).
>
> That way we could get rid of the changes linked to the assertion and still handle
> the startup process particular case. Thoughts?
Hmm. That may prove to be a good idea in the long-term. The startup
process is a specific path kicked in at a very early stage, so it is
also a bit weird that we'd try to insert statistics while we are going
to reset them anyway a bit later. That may also be relevant for
custom statistics, actually, especially if some calls happen in some
hook paths taken before the reset is done. This could happen for
injection point stats when loading it with shared_preload_libraries,
actually, if you load, attach or run a callback at this early stage.
The existing sanity checks are a safety net that we should not change
or adapt for specific stats kinds conditions, IMO. Perhaps this had
better be done as a patch of its own, on top of the rest.
> Yeah that's the reason why I suggested "pgstat_backend.c". I would not be
> surprised if we add more "per backend" stats (that are not I/O related) in the
> future as the main machinery would be there.
Okay.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (32+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: per backend I/O statistics
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