Re: widen vacuum buffer counters

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 09:52:56
Message-ID: 20200201095256.GC4133@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 31, 2020 at 05:13:53PM -0500, Tom Lane wrote:
> +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.

I would not recommend doing a back-patch because of that. I don't
think that's worth taking any risk. Extension authors can have a lot
of imagination.

> 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? Anyway, looking at the patch,
couldn't we just use uint64?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dent John 2020-02-01 09:55:28 Re: polymorphic table functions light
Previous Message Michael Paquier 2020-02-01 09:34:33 Re: Prevent pg_basebackup running as root