Re: Slim down integer formatting - Mailing list pgsql-hackers

From David Rowley
Subject Re: Slim down integer formatting
Date
Msg-id CAApHDvpaXu9qcyDETwDv=J89ozUt0-1P0hEoA84giLNEHysVNg@mail.gmail.com
Whole thread Raw
In response to Re: Slim down integer formatting  (David Fetter <david@fetter.org>)
List pgsql-hackers
On Wed, 28 Jul 2021 at 14:25, David Fetter <david@fetter.org> wrote:
> Intuitively, I'd expect us to get things in the neighborhood of 1 a
> lot more often than things in the neighborhood of 1 << (30 or 60).  Do
> we have some idea of the distribution, or at least of the distribution
> family, that we should expect for ints?

serial and bigserial are generally going to start with smaller
numbers. Larger and longer lived databases those numbers could end up
on the larger side.  serial and bigserial should be a fairly large
portion of the use case for integer types, so anything that slows down
int4out and int8out for lower order numbers is not a good idea. I
think it would have to be a very small slowdown on the low order
numbers vs a large speedup for higher order numbers for us to even
consider it.

David



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Out-of-memory error reports in libpq
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep