From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: widen vacuum buffer counters
Date: Sat, 01 Feb 2020 10:26:31 -0500
Message-ID: <16460.1580570791@sss.pgh.pa.us> (raw)
In-Reply-To: <20200201095256.GC4133@paquier.xyz>
References: <20200131205926.GA16367@alvherre.pgsql>
<4969.1580508833@sss.pgh.pa.us>
<20200201095256.GC4133@paquier.xyz>
Michael Paquier <michael@paquier.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, alvherre@2ndquadrant.com
Subject: Re: widen vacuum buffer counters
In-Reply-To: <16460.1580570791@sss.pgh.pa.us>
References: <20200131205926.GA16367@alvherre.pgsql> <4969.1580508833@sss.pgh.pa.us> <20200201095256.GC4133@paquier.xyz> <16460.1580570791@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox