Re: widen vacuum buffer counters

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: widen vacuum buffer counters
Date: 2020-02-01 15:26:31
Message-ID: 16460.1580570791@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Paquier <michael(at)paquier(dot)xyz> writes:
> On Fri, Jan 31, 2020 at 05:13:53PM -0500, Tom Lane wrote:
>> Also, %zd is the wrong format code for int64. Recommended practice
>> these days is to use "%lld" with an explicit cast of the printf argument
>> to long long (just to be sure). That doesn't work safely before v12,
>> and if you did insist on back-patching further, you'd need to jump
>> through hoops to avoid having platform-specific format codes in a
>> translatable string. (The side-effects for translation seem like
>> an independent argument against back-patching.)

> Surely you meant INT64_FORMAT here?

No, because that varies depending on platform, so using it in a
translatable string is a bad idea. See e.g. 6a1cd8b92.

> Anyway, looking at the patch,
> couldn't we just use uint64?

Yeah, I was wondering if those counters shouldn't be unsigned, too.
Probably doesn't matter once we widen them to 64 bits though.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sehrope Sarkuni 2020-02-01 15:37:22 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)
Previous Message Tomas Vondra 2020-02-01 14:24:46 Re: PATCH: add support for IN and @> in functional-dependency statistics use