pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Li Japin <japinli@hotmail.com>
Cc: kuroda.hayato@fujitsu.com, "David G. Johnston" <david.g.johnston@gmail.com>
Subject: Re: About to add WAL write/fsync statistics to pg_stat_wal view
Date: Mon, 15 Feb 2021 11:32:12 +0900
Message-ID: <57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.com> (raw)
In-Reply-To: <f081d50f-f20d-8706-aba3-f59cddf7a949@oss.nttdata.com>
References: <0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com>
	<BC7530CF-3730-4E4C-A843-3B9F514786C3@hotmail.com>
	<65e99b78066ab1e3dc82a4e6f5e6f3cd@oss.nttdata.com>
	<7aef8ee6eea05a38ca91580caa5b2f07@oss.nttdata.com>
	<CAD21AoB=RCYME3+iroY+8TrC9tsHTPo7kRKCpU7C_kZ8kgGW2A@mail.gmail.com>
	<8555ab589d74ec2df61237209f4f21f2@oss.nttdata.com>
	<CAD21AoC+Z7-OAwr0RES+WgAvMmi3Uv-bh6u4W1cfS_=Z0hddqg@mail.gmail.com>
	<95c26651303d0e5227cb763061cf15dc@oss.nttdata.com>
	<d18188f83ab56a32b48e29baf920d245@oss.nttdata.com>
	<CAD21AoAMxDwey2v5tVF-3Xhu2VNUXA-9CUuZ1ZmKS3__nceJTw@mail.gmail.com>
	<afeef2fecff653f2e29d1dc5056c08a3@oss.nttdata.com>
	<CAD21AoC0B_miiA5rkk-yAac8_q6C4aVmNWFOHhE6vwNncma0Ng@mail.gmail.com>
	<CAKFQuwa7xDBXwk2nr2=+_f+=2YcwUaXC2eU7eCpokipCEBJe7A@mail.gmail.com>
	<395f109540835fabe76dbd9d45733a14@oss.nttdata.com>
	<CAKFQuwbpRk644CXZ5M_T3j3a-wb5MN-FGn5FkRQ0PvKnAmD9jg@mail.gmail.com>
	<925e940a832e96ca5d7276a4cc3dec83@oss.nttdata.com>
	<3df6e23e3e1e9cd95b08c943ef320046@oss.nttdata.com>
	<f081d50f-f20d-8706-aba3-f59cddf7a949@oss.nttdata.com>

On 2021-02-08 13:01, Fujii Masao wrote:
> On 2021/02/05 8:45, Masahiro Ikeda wrote:
>> I pgindented the patches.
> 
> Thanks for updating the patches!

Thanks for checking the patches.

> +       <function>XLogWrite</function>, which nomally called by an
> +       <function>issue_xlog_fsync</function>, which nomally called by 
> an
> 
> Typo: "nomally" should be "normally"?

Yes, I'll fix it.

> +       <function>XLogFlush</function> request(see <xref
> linkend="wal-configuration"/>)
> +       <function>XLogFlush</function> request(see <xref
> linkend="wal-configuration"/>),
> 
> Isn't it better to add a space character just after "request"?

Thanks, I'll fix it.

> +					INSTR_TIME_SET_CURRENT(duration);
> +					INSTR_TIME_SUBTRACT(duration, start);
> +					WalStats.m_wal_write_time = INSTR_TIME_GET_MICROSEC(duration);
> 
> If several cycles happen in the do-while loop, m_wal_write_time should 
> be
> updated with the sum of "duration" in those cycles instead of 
> "duration"
> in the last cycle? If yes, "+=" should be used instead of "=" when 
> updating
> m_wal_write_time?
> +			INSTR_TIME_SET_CURRENT(duration);
> +			INSTR_TIME_SUBTRACT(duration, start);
> +			WalStats.m_wal_sync_time = INSTR_TIME_GET_MICROSEC(duration);
> 
> Also "=" should be "+=" in the above?

Yes, they are my mistake when changing the unit from milliseconds to 
microseconds.

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION





view thread (67+ messages)  latest in thread

Message-ID: <57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.com>
Permalink:  ../57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.com/
Also on:    postgresql.org/message-id/57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: ikedamsh@oss.nttdata.com, masao.fujii@oss.nttdata.com, sawada.mshk@gmail.com, japinli@hotmail.com, david.g.johnston@gmail.com
  Subject: Re: About to add WAL write/fsync statistics to pg_stat_wal view
  In-Reply-To: <57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.com>
  References: <0509ad67b585a5b86a83d445dfa75392@oss.nttdata.com> <7aef8ee6eea05a38ca91580caa5b2f07@oss.nttdata.com> <CAD21AoB=RCYME3+iroY+8TrC9tsHTPo7kRKCpU7C_kZ8kgGW2A@mail.gmail.com> <8555ab589d74ec2df61237209f4f21f2@oss.nttdata.com> <CAD21AoC+Z7-OAwr0RES+WgAvMmi3Uv-bh6u4W1cfS_=Z0hddqg@mail.gmail.com> <95c26651303d0e5227cb763061cf15dc@oss.nttdata.com> <d18188f83ab56a32b48e29baf920d245@oss.nttdata.com> <CAD21AoAMxDwey2v5tVF-3Xhu2VNUXA-9CUuZ1ZmKS3__nceJTw@mail.gmail.com> <afeef2fecff653f2e29d1dc5056c08a3@oss.nttdata.com> <CAD21AoC0B_miiA5rkk-yAac8_q6C4aVmNWFOHhE6vwNncma0Ng@mail.gmail.com> <CAKFQuwa7xDBXwk2nr2=+_f+=2YcwUaXC2eU7eCpokipCEBJe7A@mail.gmail.com> <395f109540835fabe76dbd9d45733a14@oss.nttdata.com> <CAKFQuwbpRk644CXZ5M_T3j3a-wb5MN-FGn5FkRQ0PvKnAmD9jg@mail.gmail.com> <925e940a832e96ca5d7276a4cc3dec83@oss.nttdata.com> <3df6e23e3e1e9cd95b08c943ef320046@oss.nttdata.com> <f081d50f-f20d-8706-aba3-f59cddf7a949@oss.nttdata.com> <57870df084d7f0462a29b9a9c8d49d44@oss.nttdata.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