From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Re-order pg_attribute columns to eliminate some padding space.
Date: Sun, 23 May 2021 16:12:24 +0000
Message-ID: <E1lkqiG-00014C-P0@gemulon.postgresql.org> (raw)
Re-order pg_attribute columns to eliminate some padding space.
Now that attcompression is just a char, there's a lot of wasted
padding space after it. Move it into the group of char-wide
columns to save a net of 4 bytes per pg_attribute entry. While
we're at it, swap the order of attstorage and attalign to make for
a more logical grouping of these columns.
Also re-order actions in related code to match the new field ordering.
This patch also fixes one outright bug: equalTupleDescs() failed to
compare attcompression. That could, for example, cause relcache
reload to fail to adopt a new value following a change.
Michael Paquier and Tom Lane, per a gripe from Andres Freund.
Discussion: https://postgr.es/m/20210517204803.iyk5wwvwgtjcmc5w@alap3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/f5024d8d7b04de2f5f4742ab433cc38160354861
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 28 ++++++++++++++--------------
src/backend/access/common/tupdesc.c | 16 +++++++++++-----
src/backend/access/spgist/spgutils.c | 4 ++--
src/backend/bootstrap/bootstrap.c | 13 +++++++------
src/backend/catalog/genbki.pl | 8 ++++----
src/backend/catalog/heap.c | 19 ++++++++++---------
src/backend/catalog/index.c | 10 ++++++----
src/backend/commands/tablecmds.c | 28 ++++++++++++----------------
src/include/access/spgist_private.h | 2 +-
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_attribute.h | 22 +++++++++++-----------
11 files changed, 79 insertions(+), 73 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Re-order pg_attribute columns to eliminate some padding space.
In-Reply-To: <E1lkqiG-00014C-P0@gemulon.postgresql.org>
References: <E1lkqiG-00014C-P0@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox