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, 27 Nov 2024 15:33:38 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
On Mon, Nov 25, 2024 at 03:47:59PM +0000, Bertrand Drouvot wrote:
> It also takes care of most of the comments that you have made in [1], meaning
> that it:
>
> - removes the backend type from PgStat_Backend and look for the backend type
> at "display" time.
> - creates PgStat_BackendPendingIO and PgStat_PendingIO now refers to it (I
> used PgStat_BackendPendingIO and not PgStat_BackendPending because this is what
> it is after all).
> - adds the missing comment related to the PID in the doc.
> - merges 0004 with 0001 (so that pg_stat_get_backend_io() is now part of 0001).
> - creates its own pgstat_backend.c file.
I have begun studying the patch, and I have one question.
+void
+pgstat_create_backend_stat(ProcNumber procnum)
[...]
+ /* Create the per-backend statistics entry */
+ if (pgstat_tracks_per_backend_bktype(MyBackendType))
+ pgstat_create_backend_stat(MyProcNumber);
Perhaps that's a very stupid question, but I was looking at this part
of the patch, and wondered why we don't use init_backend_cb? I
vaguely recalled that MyProcNumber and MyBackendType would be set
before we go through the pgstat initialization step. MyDatabaseId is
filled after the pgstat initialization, but we don't care about this
information for such backend stats.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (833B, ../[email protected]/2-signature.asc)
download
view thread (12+ 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