public inbox for [email protected]
help / color / mirror / Atom feedFrom: Drouvot, Bertrand <[email protected]>
To: Michael Paquier <[email protected]>
To: Kyotaro Horiguchi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry
Date: Wed, 29 Mar 2023 07:44:20 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <ZCJ53/[email protected]>
<[email protected]>
<ZCKGROQ/[email protected]>
<[email protected]>
<[email protected]>
Hi,
On 3/29/23 2:09 AM, Michael Paquier wrote:
> On Tue, Mar 28, 2023 at 05:43:26PM +0900, Kyotaro Horiguchi wrote:
>> No. Fine by me, except that "block read requests" seems to suggest
>> kernel read() calls, maybe because it's not clear whether "block"
>> refers to our buffer blocks or file blocks to me.. If it is generally
>> clear, I'm fine with the proposal.
>
> Okay. Would somebody like to draft a patch?
Please find a draft attached.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index c809ff1ba4..ae5d9a0226 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -5724,8 +5724,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<returnvalue>bigint</returnvalue>
</para>
<para>
- Returns the number of buffers fetched for table or index, in the current
- transaction.
+ Returns the number of block read requests for table or index, in the
+ current transaction. This number minus <function>
+ pg_stat_get_xact_blocks_hit</function> gives the number of kernel
+ <function>read()</function> calls.
</para></entry>
</row>
@@ -5738,8 +5740,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<returnvalue>bigint</returnvalue>
</para>
<para>
- Returns the number of buffer hits for table or index, in the current
- transaction.
+ Returns the number of block read requests for table or index, in the
+ current transaction, found in cache (not triggering kernel
+ <function>read()</function> calls).
</para></entry>
</row>
Attachments:
[text/plain] v3-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch (1.2K, ../[email protected]/2-v3-0001-pg_stat_get_xact_blocks_fetched-and_hit-doc.patch)
download | inline diff:
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index c809ff1ba4..ae5d9a0226 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -5724,8 +5724,10 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<returnvalue>bigint</returnvalue>
</para>
<para>
- Returns the number of buffers fetched for table or index, in the current
- transaction.
+ Returns the number of block read requests for table or index, in the
+ current transaction. This number minus <function>
+ pg_stat_get_xact_blocks_hit</function> gives the number of kernel
+ <function>read()</function> calls.
</para></entry>
</row>
@@ -5738,8 +5740,9 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
<returnvalue>bigint</returnvalue>
</para>
<para>
- Returns the number of buffer hits for table or index, in the current
- transaction.
+ Returns the number of block read requests for table or index, in the
+ current transaction, found in cache (not triggering kernel
+ <function>read()</function> calls).
</para></entry>
</row>
view thread (4+ 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: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry
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