From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce the size of the fmgr_builtin_oid_index[] array.
Date: Wed, 09 Jan 2019 20:22:55 +0000
Message-ID: <E1ghKNL-0002cM-IM@gemulon.postgresql.org> (raw)
Reduce the size of the fmgr_builtin_oid_index[] array.
This index array was originally defined to have 10000 entries (ranging
up to FirstGenbkiObjectId), but we really only need entries up to the
last existing builtin function OID, currently 6121. That saves close
to 8K of never-accessed space in the server executable, at the small
price of one more fetch in fmgr_isbuiltin().
We could reduce the array size still further by renumbering a few of
the highest-numbered builtin functions; but there's a small risk of
breaking clients that have chosen to hardwire those function OIDs,
so it's not clear if it'd be worth the trouble. (We should, however,
discourage future patches from choosing function OIDs above 6K as long
as there's still lots of space below that.)
Discussion: https://postgr.es/m/12359.1547063064@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8ff5f824dca75174e3d3efc7c1182cf1d388bacc
Modified Files
--------------
src/backend/utils/Gen_fmgrtab.pl | 28 ++++++++++++----------------
src/backend/utils/fmgr/fmgr.c | 4 ++--
src/include/utils/fmgrtab.h | 8 +++++---
3 files changed, 19 insertions(+), 21 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: Reduce the size of the fmgr_builtin_oid_index[] array.
In-Reply-To: <E1ghKNL-0002cM-IM@gemulon.postgresql.org>
References: <E1ghKNL-0002cM-IM@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