Re: Save a few bytes in pg_attribute

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Save a few bytes in pg_attribute
Date: 2023-03-20 19:51:15
Message-ID: CAApHDvrbDnpYzFEHwHpPihSfxxhrZ6fzZ3nO9HjEE79+kR0YuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 20 Mar 2023, 11:00 pm Peter Eisentraut,
<peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:
> After the discussion in [0] ff., I was looking around in pg_attribute
> and noticed that we could possibly save 4 bytes. We could change both
> attstattarget and attinhcount from int4 to int2, which together with
> some reordering would save 4 bytes from the fixed portion.

I just want to highlight 1ef61ddce9, which fixed a very long-standing
bug that meant that pg_inherits.inhseqno was effectively just 16-bit.
Perhaps because nobody seemed to report that as a limitation 16 bits
is enough space. I only noticed that as a bug from code reading.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Egor Rogov 2023-03-20 19:54:24 Re: pg_stats and range statistics
Previous Message Gregory Stark (as CFM) 2023-03-20 19:34:55 Re: [PATCH] Introduce array_shuffle() and array_sample()