Re: overflow bug for inhcounts - Mailing list pgsql-hackers

From Andres Freund
Subject Re: overflow bug for inhcounts
Date
Msg-id tlfcuuguhz5hursjrtr5y3rjp5uzl4mp7cmdbfcsobhgkwcbcu@aczxrdd5ob7s
Whole thread Raw
List pgsql-hackers
Hi,

On 2024-10-08 18:11:39 +0200, Alvaro Herrera wrote:
> Oh and actually, we could change all these variables to be unsigned,
> since there's no use for negative inhcounts.  The patch doesn't do that;
> it'd require changing the subtraction paths to use overflow-protected
> ops as well.

Unfortunately we don't really have a way to represent unsigned numbers on the
SQL level today. So I'd not go there for now - it's not like this is a real
limitation for practical use cases.

One case where I'd like unsigned numbers is pg_class.relpages - it's pretty
awkward that it "looks" negative for large tables. 16TB isn't that large
anymore...

Greetings,

Andres



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Avoiding superfluous buffer locking during nbtree backwards scans
Next
From: Robert Haas
Date:
Subject: Re: On disable_cost