pgsql: Avoid using large pass-by-value struct arguments in pgbench.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid using large pass-by-value struct arguments in pgbench.
Date: 2022-03-27 18:38:40
Message-ID: E1nYXmh-001dyM-HE@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid using large pass-by-value struct arguments in pgbench.

In the wake of commit 4a39f87ac, which noticeably increased the
size of struct StatsData and thereby ParsedScript, Coverity started
to complain that ParsedScript was unreasonably large to be passing
by value. The two places that do this are only used during setup,
so they're not really dragging down benchmark measurements --- but
gratuitous inefficiency is not a good look in a benchmarking program.
Convert to use pointers instead.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/641a9b716789628a4e7403ecef1b82cc4a9552b0

Modified Files
--------------
src/bin/pgbench/pgbench.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-03-27 19:05:28 pgsql: Remove useless variable.
Previous Message Tom Lane 2022-03-27 16:58:21 pgsql: Fix breakage of get_ps_display() in the PS_USE_NONE case.