From: Tatsuo Ishii <ishii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use COPY FREEZE in pgbench for faster benchmark table population
Date: Thu, 02 Sep 2021 01:48:48 +0000
Message-ID: <E1mLbqS-0008PJ-Tl@gemulon.postgresql.org> (raw)
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(-)
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: ishii@postgresql.org
Subject: Re: pgsql: Use COPY FREEZE in pgbench for faster benchmark table population
In-Reply-To: <E1mLbqS-0008PJ-Tl@gemulon.postgresql.org>
References: <E1mLbqS-0008PJ-Tl@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