pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Julien Rouhaud <rjuju123@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Kirill Bychik <kirill.bychik@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Subject: Re: User Interface for WAL usage data
Date: Fri, 3 Apr 2020 00:11:12 -0500
Message-ID: <20200403051111.GM14618@telsasoft.com> (raw)
In-Reply-To: <CAA4eK1JMvwBSvnPJTLipr4eKx99axxXzLjoH04q85NCFhndhyQ@mail.gmail.com>
References: <CAA4eK1+o1Vj4Rso09pKOaKhY8QWTA0gWwCL3TGCi1rCLBBf-QQ@mail.gmail.com>
	<20200402054120.GC14618@telsasoft.com>
	<20200402.145826.78549992113208057.horikyota.ntt@gmail.com>
	<CAA4eK1J0CaomuePkTGG2OBEukeDmLFWQ4kP=+zvBcX324t=EUA@mail.gmail.com>
	<20200402063540.GE14618@telsasoft.com>
	<CAA4eK1JMvwBSvnPJTLipr4eKx99axxXzLjoH04q85NCFhndhyQ@mail.gmail.com>

> > > > > Regarding v10-0004-Add-option-to-report-WAL-usage-in-EXPLAIN-and-au.patch:
> > > > > I think there should be additional spaces before "full" and before "bytes":
> > > > >
> > > > > >    WAL: records=2359 full page records=42 bytes=447788
> > > > >
> > > > > Compare with these:
> > > > >
> > > > >        "Sort Method: %s  %s: %ldkB\n",
> > > > >        "Buckets: %d (originally %d)  Batches: %d (originally %d)  Memory Usage: %ldkB\n",
> > > > >        "Buckets: %d  Batches: %d  Memory Usage: %ldkB\n",
> > > > >
> > > > > Otherwise "records=2359 full page records=42" is hard to parse.
> > > >
> > > > I got the same feeling seeing the line.
> > >
> > > But isn't this same as we have BufferUsage data?  We can probably
> > > display it as full_page_writes or something like that.
> >
> > I guess you mean this:
> >          Buffers: shared hit=994 read=11426 dirtied=466
> >
> > Which can show shared/local/temp.  Actually I would probably make the same
> > suggestion for "Buffers" (if it were a new patch).  I would find this to be
> > pretty unfriendly output:
> >
> >          Buffers: shared hit=12345 read=12345 dirtied=12345 local hit=12345 read=12345 dirtied=12345 temp hit=12345 read=12345 dirtied=12345
> >
> > Adding two extra spaces "  local" and "  temp" would have helped there, so
> > would commas, or parenthesis, dashes or almost anything - other than a
> > backslash.
> >
> > So I think you're right that WAL is very similar to the Buffers case[...]

Actually, I take that back.  If I understand correctly, there should be two
spaces not only to make the 2nd field more clear, but because the three values
have different units:

> > > > > >    WAL: records=2359 full page records=42 bytes=447788

1) records; 2) pages ("full page images"); 3) bytes

That is exactly like sort (method/type/size) and hash (buckets/batches/size),
and *not* like buffers, which shows various values all in units of "pages".

-- 
Justin





view thread (16+ messages)  latest in thread

Message-ID: <20200403051111.GM14618@telsasoft.com>
Permalink:  ../20200403051111.GM14618@telsasoft.com/
Also on:    postgresql.org/message-id/20200403051111.GM14618@telsasoft.com

 · 

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: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, amit.kapila16@gmail.com, horikyota.ntt@gmail.com, rjuju123@gmail.com, dilipbalaut@gmail.com, kirill.bychik@gmail.com, masao.fujii@oss.nttdata.com
  Subject: Re: User Interface for WAL usage data
  In-Reply-To: <20200403051111.GM14618@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox