Re: wal stats questions

From: "Andres Freund" <andres(at)anarazel(dot)de>
To: "Fujii Masao" <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, "Masahiro Ikeda" <ikedamsh(at)oss(dot)nttdata(dot)com>, torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>
Cc: "PostgreSQL Development" <pgsql-hackers(at)postgresql(dot)org>, "Kyotaro Horiguchi" <horikyota(dot)ntt(at)gmail(dot)com>
Subject: Re: wal stats questions
Date: 2021-04-22 15:36:59
Message-ID: b5e6e6ee-eed5-42f6-8e9c-b8178cca0655@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

On Thu, Apr 22, 2021, at 06:42, Fujii Masao wrote:
>
>
> On 2021/04/21 18:31, Masahiro Ikeda wrote:
> >> BTW, is it better to change PgStat_Counter from int64 to uint64 because> there aren't any counters with negative number?
>
> On second thought, it's ok even if the counters like wal_records get overflowed.
> Because they are always used to calculate the diff between the previous and
> current counters. Even when the current counters are overflowed and
> the previous ones are not, WalUsageAccumDiff() seems to return the right
> diff of them. If this understanding is right, I'd withdraw my comment and
> it's ok to use "long" type for those counters. Thought?

Why long? It's of a platform dependent size, which doesn't seem useful here?

Andres

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-04-22 15:46:09 Re: multi-install PostgresNode fails with older postgres versions
Previous Message Andrew Dunstan 2021-04-22 15:13:20 Re: multi-install PostgresNode fails with older postgres versions