Re: User Interface for WAL usage data - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: User Interface for WAL usage data
Date
Msg-id CAA4eK1LKVhSnoX5TV6=UGB75V_+cMH6YhK2x+ucN++8OOpF5uw@mail.gmail.com
Whole thread Raw
In response to Re: User Interface for WAL usage data  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-hackers
On Mon, Apr 6, 2020 at 10:04 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> On Thu, Apr 02, 2020 at 08:29:31AM +0200, Julien Rouhaud wrote:
> > > > "full page records" seems to be showing the number of full page
> > > > images, not the record having full page images.
> > >
> > > I am not sure what exactly is a difference but it is the records
> > > having full page images.  Julien correct me if I am wrong.
>
> > Obviously previous complaints about the meaning and parsability of
> > "full page writes" should be addressed here for consistency.
>
> There's a couple places that say "full page image records" which I think is
> language you were trying to avoid.  It's the number of pages, not the number of
> records, no ?  I see explain and autovacuum say what I think is wanted, but
> these say the wrong thing?  Find attached slightly larger patch.
>
> $ git grep 'image record'
> contrib/pg_stat_statements/pg_stat_statements.c:        int64           wal_num_fpw;    /* # of WAL full page image
recordsgenerated */
 
> doc/src/sgml/ref/explain.sgml:      number of records, number of full page image records and amount of WAL
>

Few comments:
1.
- int64 wal_num_fpw; /* # of WAL full page image records generated */
+ int64 wal_num_fpw; /* # of WAL full page images generated */

Let's change comment as " /* # of WAL full page writes generated */"
to be consistent with other places like instrument.h.  Also, make a
similar change at other places if required.

2.
       <entry>
-        Total amount of WAL bytes generated by the statement
+        Total number of WAL bytes generated by the statement
       </entry>

I feel the previous text was better as this field can give us the size
of WAL with which we can answer "how much WAL data is generated by a
particular statement?".  Julien, do you have any thoughts on this?

Can we please post/discuss patches on the main thread [1]?

[1] - https://www.postgresql.org/message-id/CAB-hujrP8ZfUkvL5OYETipQwA%3De3n7oqHFU%3D4ZLxWS_Cza3kQQ%40mail.gmail.com

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise
Next
From: yuzuko
Date:
Subject: Re: Autovacuum on partitioned table