Re: wal stats questions

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: andres(at)anarazel(dot)de
Cc: ikedamsh(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)postgresql(dot)org, masao(dot)fujii(at)oss(dot)nttdata(dot)com
Subject: Re: wal stats questions
Date: 2021-03-29 02:11:00
Message-ID: 20210329.111100.115307592513843047.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Mon, 29 Mar 2021 11:09:00 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> At Fri, 26 Mar 2021 10:07:45 -0700, Andres Freund <andres(at)anarazel(dot)de> wrote in
> > Hi,
> >
> > On 2021-03-25 16:37:10 +0900, Kyotaro Horiguchi wrote:
> > > On the other hand, the counters are incremented in XLogInsertRecord()
> > > and I think we don't want add instructions there.
> >
> > I don't really buy this. Setting a boolean to true, in a cacheline
> > you're already touching, isn't that much compared to all the other stuff
> > in there. The branch to check if wal stats timing etc is enabled is much
> > more expensive. I think we should just set a boolean to true and leave
> > it at that.
>
> Hmm. Yes, I agree to you in that opinion. I (remember I) was told not

It might sound differently.. To be precise, "I had the same opinion
with you".

> to add even a cycle to the hot path as far as we can avoid when I
> tried something like that.
>
> So I'm happy to +1 for that if it is the consensus here, since it is
> cleaner.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-03-29 02:18:17 name of enum used in 'Cache if PathTarget and RestrictInfos contain volatile functions'
Previous Message Kyotaro Horiguchi 2021-03-29 02:09:00 Re: wal stats questions