Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixufU-0006fu-JG for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Feb 2020 15:26:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixufR-0006yQ-Ce for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Feb 2020 15:26:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ixufR-0006yJ-3f for pgsql-hackers@lists.postgresql.org; Sat, 01 Feb 2020 15:26:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ixufN-0004KC-QB for pgsql-hackers@lists.postgresql.org; Sat, 01 Feb 2020 15:26:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 011FQVSk016461; Sat, 1 Feb 2020 10:26:32 -0500 From: Tom Lane To: Michael Paquier cc: Alvaro Herrera , Pg Hackers Subject: Re: widen vacuum buffer counters In-reply-to: <20200201095256.GC4133@paquier.xyz> References: <20200131205926.GA16367@alvherre.pgsql> <4969.1580508833@sss.pgh.pa.us> <20200201095256.GC4133@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Sat, 01 Feb 2020 18:52:56 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <16459.1580570791.1@sss.pgh.pa.us> Date: Sat, 01 Feb 2020 10:26:31 -0500 Message-ID: <16460.1580570791@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier 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