pgsql: Use COPY FREEZE in pgbench for faster benchmark table population

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use COPY FREEZE in pgbench for faster benchmark table population
Date: 2021-09-02 01:48:48
Message-ID: E1mLbqS-0008PJ-Tl@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use COPY FREEZE in pgbench for faster benchmark table population.

While populating the pgbench_accounts table, plain COPY was
unconditionally used. By changing it to COPY FREEZE, the time for
VACUUM is significantly reduced, thus the total time of "pgbench -i"
is also reduced. This only happens if pgbench runs against PostgreSQL
14 or later because COPY FREEZE in previous versions of PostgreSQL does
not bring the benefit. Also if partitioning is used, COPY FREEZE
cannot be used. In this case plain COPY will be used too.

Author: Tatsuo Ishii
Discussion: https://postgr.es/m/20210308.143907.2014279678657453983.t-ishii@gmail.com
Reviewed-by: Fabien COELHO, Laurenz Albe, Peter Geoghegan, Dean Rasheed

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/06ba4a63b85e5aa47b325c3235c16c05a0b58b96

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 3 +++
src/bin/pgbench/pgbench.c | 11 ++++++++++-
2 files changed, 13 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-09-02 02:37:00 pgsql: doc: Replace some uses of "which" by "that" in parallel.sgml
Previous Message Tom Lane 2021-09-01 21:25:08 pgsql: Doc: clarify how triggers relate to transactions.