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 1ixeY3-0000Bb-Np for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2020 22:13:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ixeY2-0000fY-EU for pgsql-hackers@arkaria.postgresql.org; Fri, 31 Jan 2020 22:13:58 +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 1ixeY2-0000eg-5a for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2020 22:13:58 +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 1ixeXz-0001gs-Uw for pgsql-hackers@lists.postgresql.org; Fri, 31 Jan 2020 22:13:57 +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 00VMDrb7004970; Fri, 31 Jan 2020 17:13:53 -0500 From: Tom Lane To: Alvaro Herrera cc: Pg Hackers Subject: Re: widen vacuum buffer counters In-reply-to: <20200131205926.GA16367@alvherre.pgsql> References: <20200131205926.GA16367@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 31 Jan 2020 17:59:26 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4968.1580508833.1@sss.pgh.pa.us> Date: Fri, 31 Jan 2020 17:13:53 -0500 Message-ID: <4969.1580508833@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > We recently noticed that vacuum buffer counters wraparound in extreme > cases, with ridiculous results. Ugh. > I propose to backpatch this. +1 for widening these counters, but since they're global variables, -0.2 or so for back-patching. I don't know of any reason that an extension would be touching these, but I feel like the problem isn't severe enough to justify taking an ABI-break risk. 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.) regards, tom lane