Re: Slim down integer formatting

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Slim down integer formatting
Date: 2021-07-28 02:39:28
Message-ID: CAApHDvpaXu9qcyDETwDv=J89ozUt0-1P0hEoA84giLNEHysVNg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 28 Jul 2021 at 14:25, David Fetter <david(at)fetter(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-07-28 02:42:15 Re: Use WaitLatch for {pre, post}_auth_delay instead of pg_usleep
Previous Message Tom Lane 2021-07-28 02:31:25 Re: Out-of-memory error reports in libpq