pgsql: Cache typlens of a SQL function's input arguments.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Cache typlens of a SQL function's input arguments.
Date: 2025-04-17 16:57:47
Message-ID: E1u5SYd-000Vjw-1r@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Cache typlens of a SQL function's input arguments.

This gets rid of repetitive get_typlen calls in postquel_sub_params,
which show up as costing a few percent of the runtime in simple test
cases (more with more parameters).

In combination with the preceding patches, this gets us most of the
way back down to the amount of per-call overhead that functions.c
had before commit 0dca5d68d. There are some more things that could
be done, but this seems like an okay place to stop for v18.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0400ae4a68831250347407463453447daa9548df

Modified Files
--------------
src/backend/executor/functions.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-04-17 17:02:05 Re: pgsql: Make SQLFunctionCache long-lived again.
Previous Message Robert Haas 2025-04-17 14:42:45 Re: pgsql: Add function to get memory context stats for processes