Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-25 Thread Fujii Masao
On 2021/03/25 11:50, Masahiro Ikeda wrote: On 2021/03/23 16:10, Fujii Masao wrote: On 2021/03/22 20:25, ikedamsh wrote: Agreed. Users can know whether the stats is for walreceiver or not. The pg_stat_wal view in standby server shows for the walreceiver, and in primary server it shows for

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-24 Thread Masahiro Ikeda
On 2021/03/23 16:10, Fujii Masao wrote: > > > On 2021/03/22 20:25, ikedamsh wrote: >> Agreed. Users can know whether the stats is for walreceiver or not. The >> pg_stat_wal view in standby server shows for the walreceiver, and in primary >> server it shows for the others. So, I updated the doc

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-23 Thread Fujii Masao
On 2021/03/22 20:25, ikedamsh wrote: Agreed. Users can know whether the stats is for walreceiver or not. The pg_stat_wal view in standby server shows for the walreceiver, and in primary server it shows for the others. So, I updated the document. (v20-0003-Makes-the-wal-receiver-report-WAL-stat

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-22 Thread ikedamsh
On 2021/03/22 16:50, Fujii Masao wrote: > > > On 2021/03/22 9:50, ikedamsh wrote: >> Agreed. I separated the patches. >> >> If only the former is committed, my trivial concern is that there may be >> a disadvantage, but no advantage for the standby server. It may lead to >> performance degradat

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-22 Thread Fujii Masao
On 2021/03/22 9:50, ikedamsh wrote: Agreed. I separated the patches. If only the former is committed, my trivial concern is that there may be a disadvantage, but no advantage for the standby server. It may lead to performance degradation to the wal receiver by calling INSTR_TIME_SET_CURRENT(),

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-21 Thread ikedamsh
On 2021-03-19 16:30, Fujii Masao wrote: > On 2021/03/15 10:39, Masahiro Ikeda wrote: >> Thanks, I understood get_sync_bit() checks the sync flags and >> the write unit of generated wal data and replicated wal data is >> different. >> (It's interesting optimization whether to use kernel cache or no

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-19 Thread Fujii Masao
On 2021/03/15 10:39, Masahiro Ikeda wrote: Thanks, I understood get_sync_bit() checks the sync flags and the write unit of generated wal data and replicated wal data is different. (It's interesting optimization whether to use kernel cache or not.) OK. Although I agree to separate the stats fo

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-14 Thread Masahiro Ikeda
On 2021/03/11 21:29, Masahiro Ikeda wrote: On 2021-03-11 11:52, Fujii Masao wrote: On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: IIUC the stats collector basically exits after checkpointer and walwriter exit. But there seems no guarantee that the stats coll

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-14 Thread Masahiro Ikeda
On 2021-03-12 12:39, Fujii Masao wrote: On 2021/03/11 21:29, Masahiro Ikeda wrote: In addition, I rebased the patch for WAL receiver. (v17-0003-Makes-the-wal-receiver-report-WAL-statistics.patch) Thanks! Will review this later. Thanks a lot! I read through the 0003 patch. Here are some com

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-11 Thread Fujii Masao
On 2021/03/11 23:33, Fujii Masao wrote: On 2021/03/11 21:29, Masahiro Ikeda wrote: On 2021-03-11 11:52, Fujii Masao wrote: On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-11 Thread Fujii Masao
On 2021/03/11 21:29, Masahiro Ikeda wrote: On 2021-03-11 11:52, Fujii Masao wrote: On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-11 Thread Fujii Masao
On 2021/03/11 21:29, Masahiro Ikeda wrote: On 2021-03-11 11:52, Fujii Masao wrote: On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-11 Thread Masahiro Ikeda
On 2021-03-11 11:52, Fujii Masao wrote: On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-10 Thread Fujii Masao
On 2021/03/11 9:38, Masahiro Ikeda wrote: On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-10 Thread Masahiro Ikeda
On 2021-03-10 17:08, Fujii Masao wrote: On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-10 Thread Fujii Masao
On 2021/03/10 14:11, Masahiro Ikeda wrote: On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-09 Thread Masahiro Ikeda
On 2021-03-09 17:51, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-09 Thread Fujii Masao
On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-09 Thread Fujii Masao
On 2021/03/09 4:47, David G. Johnston wrote: On Mon, Mar 8, 2021 at 8:48 AM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: Thanks for updating the patch! I applied cosmetic changes to that. Patch attached. Barring any objection, I will commit this version. Read over the pa

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-08 Thread David G. Johnston
On Mon, Mar 8, 2021 at 8:48 AM Fujii Masao wrote: > > Thanks for updating the patch! I applied cosmetic changes to that. > Patch attached. Barring any objection, I will commit this version. > Read over the patch and it looks good. One minor "the" omission (in a couple of places, copy-paste styl

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-08 Thread Fujii Masao
On 2021/03/08 19:42, Masahiro Ikeda wrote: On 2021-03-08 13:44, Fujii Masao wrote: On 2021/03/05 19:54, Masahiro Ikeda wrote: On 2021-03-05 12:47, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-08 Thread Masahiro Ikeda
On 2021-03-08 13:44, Fujii Masao wrote: On 2021/03/05 19:54, Masahiro Ikeda wrote: On 2021-03-05 12:47, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-07 Thread Fujii Masao
On 2021/03/05 19:54, Masahiro Ikeda wrote: On 2021-03-05 12:47, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-05 Thread Masahiro Ikeda
On 2021-03-05 12:47, Fujii Masao wrote: On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-04 Thread Fujii Masao
On 2021/03/05 8:38, Masahiro Ikeda wrote: On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-04 Thread Masahiro Ikeda
On 2021-03-05 01:02, Fujii Masao wrote: On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote:

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-04 Thread Fujii Masao
On 2021/03/04 16:14, Masahiro Ikeda wrote: On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-04 Thread Ibrar Ahmed
On Thu, Mar 4, 2021 at 12:14 PM Masahiro Ikeda wrote: > On 2021-03-03 20:27, Masahiro Ikeda wrote: > > On 2021-03-03 16:30, Fujii Masao wrote: > >> On 2021/03/03 14:33, Masahiro Ikeda wrote: > >>> On 2021-02-24 16:14, Fujii Masao wrote: > On 2021/02/15 11:59, Masahiro Ikeda wrote: > > On

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-03 Thread Masahiro Ikeda
On 2021-03-03 20:27, Masahiro Ikeda wrote: On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahi

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-03 Thread Masahiro Ikeda
On 2021-03-03 16:30, Fujii Masao wrote: On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches.

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-02 Thread Fujii Masao
On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked dur

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-02 Thread Masahiro Ikeda
On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked during an XLogFlush request (see ...).  This is al

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-23 Thread Fujii Masao
On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked during an XLogFlush request (see ...).  This is also incremented by the WAL receiver dur

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-14 Thread Masahiro Ikeda
On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked during an XLogFlush request (see ...). This is also incremented by the WAL receiver during replication. ("which normally called" shou

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-14 Thread Masahiro Ikeda
On 2021-02-08 14:26, Fujii Masao wrote: 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! +   XLogWrite, which nomally called by an +   issue_xlog_fsync, which nomally called by an Typo: "

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-14 Thread Masahiro Ikeda
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. + XLogWrite, which nomally called by an + issue_xlog_fsync, which nomally called by an Typo: "nomally

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-09 Thread David G. Johnston
On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: > I pgindented the patches. > > ... XLogWrite, which is invoked during an XLogFlush request (see ...). This is also incremented by the WAL receiver during replication. ("which normally called" should be "which is normally called" or "which no

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-07 Thread Fujii Masao
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! +   XLogWrite, which nomally called by an +   issue_xlog_fsync, which nomally called by an Typo: "nomally" should be "normally"? +  

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-07 Thread Fujii Masao
On 2021/02/05 8:45, Masahiro Ikeda wrote: I pgindented the patches. Thanks for updating the patches! + XLogWrite, which nomally called by an + issue_xlog_fsync, which nomally called by an Typo: "nomally" should be "normally"? + XLogFlush request(see ) + XLogFlush r

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-02-04 Thread Masahiro Ikeda
I pgindented the patches. Regards -- Masahiro Ikeda NTT DATA CORPORATIONFrom 47f436d7e423ece33a25adebf4265eac02e575f3 Mon Sep 17 00:00:00 2001 From: Masahiro Ikeda Date: Fri, 29 Jan 2021 16:41:34 +0900 Subject: [PATCH 1/2] Add statistics related to write/sync wal records. This patch adds follow

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-29 Thread Masahiro Ikeda
On 2021-01-27 00:14, David G. Johnston wrote: On Mon, Jan 25, 2021 at 11:56 PM Masahiro Ikeda wrote: (wal_write) The number of times WAL buffers were written out to disk via XLogWrite Thanks. I thought it's better to omit "The" and "XLogWrite" because other views' description omits "The"

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-26 Thread David G. Johnston
On Mon, Jan 25, 2021 at 11:56 PM Masahiro Ikeda wrote: > > > (wal_write) > > The number of times WAL buffers were written out to disk via XLogWrite > > > > Thanks. > > I thought it's better to omit "The" and "XLogWrite" because other views' > description > omits "The" and there is no description

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-25 Thread Masahiro Ikeda
Hi, David. Thanks for your comments. On 2021-01-26 08:48, David G. Johnston wrote: On Mon, Jan 25, 2021 at 8:03 AM Masahiko Sawada wrote: On Mon, Jan 25, 2021 at 4:51 PM Masahiro Ikeda wrote: Hi, thanks for the reviews. I updated the attached patch. Thank you for updating the patch!

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-25 Thread David G. Johnston
On Mon, Jan 25, 2021 at 4:37 PM Masahiro Ikeda wrote: > > I agree with your comments. I think it should report when > reaching the end of WAL too. I add the code to report the stats > when finishing the current WAL segment file when timeout in the > main loop and when reaching the end of WAL. > >

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-25 Thread David G. Johnston
On Mon, Jan 25, 2021 at 8:03 AM Masahiko Sawada wrote: > On Mon, Jan 25, 2021 at 4:51 PM Masahiro Ikeda > wrote: > > > > Hi, thanks for the reviews. > > > > I updated the attached patch. > > Thank you for updating the patch! > Your original email with "total number of times" is more correct, re

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-25 Thread Masahiro Ikeda
On 2021-01-26 00:03, Masahiko Sawada wrote: On Mon, Jan 25, 2021 at 4:51 PM Masahiro Ikeda wrote: Hi, thanks for the reviews. I updated the attached patch. Thank you for updating the patch! The summary of the changes is following. 1. fix document I followed another view's comments. 2.

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-25 Thread Masahiko Sawada
On Mon, Jan 25, 2021 at 4:51 PM Masahiro Ikeda wrote: > > Hi, thanks for the reviews. > > I updated the attached patch. Thank you for updating the patch! > The summary of the changes is following. > > 1. fix document > > I followed another view's comments. > > > 2. refactor issue_xlog_fsync() >

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
Hi, thanks for the reviews. I updated the attached patch. The summary of the changes is following. 1. fix document I followed another view's comments. 2. refactor issue_xlog_fsync() I removed "sync_called" variables, narrowed the "duration" scope and change the switch statement to if stateme

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiko Sawada
On Mon, Jan 25, 2021 at 1:28 PM Masahiro Ikeda wrote: > > On 2021-01-25 13:15, Masahiro Ikeda wrote: > > On 2021-01-25 10:36, Masahiko Sawada wrote: > >> On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda > >> wrote: > >>> > >>> On 2021-01-22 14:50, Masahiko Sawada wrote: > >>> > On Fri, Dec 25, 202

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
On 2021-01-25 13:15, Masahiro Ikeda wrote: On 2021-01-25 10:36, Masahiko Sawada wrote: On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda wrote: On 2021-01-22 14:50, Masahiko Sawada wrote: > On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda > wrote: >> >> Hi, >> >> I rebased the patch to the maste

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
On 2021-01-25 11:47, japin wrote: On Mon, 25 Jan 2021 at 09:36, Masahiko Sawada wrote: On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda wrote: On 2021-01-22 14:50, Masahiko Sawada wrote: > On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda > wrote: >> >> Hi, >> >> I rebased the patch to the mast

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
On 2021-01-25 10:36, Masahiko Sawada wrote: On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda wrote: On 2021-01-22 14:50, Masahiko Sawada wrote: > On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda > wrote: >> >> Hi, >> >> I rebased the patch to the master branch. > > Thank you for working on this.

RE: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread kuroda.hay...@fujitsu.com
Dear Ikeda-san, > I checked columns' descriptions of other views. > There are "Number of xxx", "Total number of xxx", "Total amount of time > that xxx" and "Total time spent xxx". Right. > Since the "time" is used for showing spending time, not count, > I'll change it to "Total number of WAL da

RE: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
On 2021-01-25 10:34, kuroda.hay...@fujitsu.com wrote: Dear Ikeda-san, Thank you for updating the patch. This can be applied to master, and can be used on my RHEL7. wal_write_time and wal_sync_time increase normally :-). ``` postgres=# select * from pg_stat_wal; -[ RECORD 1 ]+---

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread japin
On Mon, 25 Jan 2021 at 09:36, Masahiko Sawada wrote: > On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda > wrote: >> >> On 2021-01-22 14:50, Masahiko Sawada wrote: >> > On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda >> > wrote: >> >> >> >> Hi, >> >> >> >> I rebased the patch to the master branch

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiko Sawada
On Fri, Jan 22, 2021 at 10:05 PM Masahiro Ikeda wrote: > > On 2021-01-22 14:50, Masahiko Sawada wrote: > > On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda > > wrote: > >> > >> Hi, > >> > >> I rebased the patch to the master branch. > > > > Thank you for working on this. I've read the latest patch.

RE: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread kuroda.hay...@fujitsu.com
Dear Ikeda-san, Thank you for updating the patch. This can be applied to master, and can be used on my RHEL7. wal_write_time and wal_sync_time increase normally :-). ``` postgres=# select * from pg_stat_wal; -[ RECORD 1 ]+-- wal_records | 121781 wal_fpi

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-24 Thread Masahiro Ikeda
Hi, Japin Thanks for your comments. On 2021-01-23 01:46, japin wrote: Hi, Masahiro Thanks for you update the v4 patch. Here are some comments: (1) + char*msg = NULL; + boolsync_called;/* whether to sync data to the disk. */ + instr_time

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-22 Thread japin
Hi, Masahiro Thanks for you update the v4 patch. Here are some comments: (1) + char*msg = NULL; + boolsync_called;/* whether to sync data to the disk. */ + instr_time start; + instr_time duration; + + /* check whether

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-22 Thread Masahiro Ikeda
On 2021-01-22 14:50, Masahiko Sawada wrote: On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda wrote: Hi, I rebased the patch to the master branch. Thank you for working on this. I've read the latest patch. Here are comments: --- + if (track_wal_io_timing) + { +

RE: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-22 Thread Masahiro Ikeda
On 2021-01-22 11:54, kuroda.hay...@fujitsu.com wrote: Dear Ikeda-san, This patch cannot be applied to the HEAD, but anyway I put a comment. ``` + /* +* Measure i/o timing to fsync WAL data. +* +* The wal receiver skip to collect it to avoid performance degradation

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-21 Thread Masahiko Sawada
On Fri, Dec 25, 2020 at 6:46 PM Masahiro Ikeda wrote: > > Hi, > > I rebased the patch to the master branch. Thank you for working on this. I've read the latest patch. Here are comments: --- + if (track_wal_io_timing) + { + INSTR_TIME_SET_CURRENT(dura

RE: About to add WAL write/fsync statistics to pg_stat_wal view

2021-01-21 Thread kuroda.hay...@fujitsu.com
Dear Ikeda-san, This patch cannot be applied to the HEAD, but anyway I put a comment. ``` + /* +* Measure i/o timing to fsync WAL data. +* +* The wal receiver skip to collect it to avoid performance degradation of standy servers. +* If sync_method doesn't ha

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2020-12-25 Thread Masahiro Ikeda
Hi, I rebased the patch to the master branch. Regards, -- Masahiro Ikeda NTT DATA CORPORATIONdiff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 4b60382778..45d54cd394 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -7388,6 +7388,27 @@ COPY postgres_log

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2020-12-08 Thread Masahiro Ikeda
On 2020-12-08 16:45, Li Japin wrote: Hi, On Dec 8, 2020, at 1:06 PM, Masahiro Ikeda wrote: Hi, I propose to add wal write/fsync statistics to pg_stat_wal view. It's useful not only for developing/improving source code related to WAL but also for users to detect workload changes, HW failur

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2020-12-07 Thread Li Japin
Hi, > On Dec 8, 2020, at 1:06 PM, Masahiro Ikeda wrote: > > Hi, > > I propose to add wal write/fsync statistics to pg_stat_wal view. > It's useful not only for developing/improving source code related to WAL > but also for users to detect workload changes, HW failure, and so on. > > I introduc