Re: wal stats questions - Mailing list pgsql-hackers

From Kyotaro Horiguchi
Subject Re: wal stats questions
Date
Msg-id 20210326.124749.1658505387743679140.horikyota.ntt@gmail.com
Whole thread Raw
In response to Re: wal stats questions  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Responses Re: wal stats questions  (Masahiro Ikeda <ikedamsh@oss.nttdata.com>)
List pgsql-hackers
At Fri, 26 Mar 2021 10:32:23 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in 
> > I may be misunderstanding or missing something, but the only place
> > where pgWalUsage counters are increased is XLogInsertRecrod.  That is,
> > pgWalUsage counts wal insertions, not writes nor flushes.  AFAICS
> 
> Yes. And WalStats instead of pgWalUsage includes the stats about
> not only WAL insertions, but also writes and flushes.

Ugh! I was missing a very large blob.. Ok, we need additional check
for non-pgWalUsage part. Sorry.

> pgstat_send_wal() checks WalStats to determine whether there are
> pending WAL stats to send to the stats collector or not. That is,
> the counters of not only WAL insertions but also writes and flushes
> should be checked to determine whether there are pending stats or not,
> I think..

I think we may have an additional flag to notify about io-stat part,
in constrast to wal-insertion part . Anyway we do additional
INSTR_TIME_SET_CURRENT when track_wal_io_timinge.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: MultiXact\SLRU buffers configuration
Next
From: Fujii Masao
Date:
Subject: Re: Get memory contexts of an arbitrary backend process