Re: Using COPY FREEZE in pgbench

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Using COPY FREEZE in pgbench
Date: 2021-03-08 10:32:42
Message-ID: alpine.DEB.2.22.394.2103081122550.2754793@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello Tatsuo-san,

> Currently pgbench uses plain COPY to populate pgbench_accounts
> table. With adding FREEZE option to COPY, the time to perform "pgbench
> -i" will be significantly reduced.
>
> Curent master:
> pgbench -i -s 100
> done in 70.78 s (drop tables 0.21 s, create tables 0.02 s, client-side generate 12.42 s, vacuum 51.11 s, primary keys 7.02 s).
>
> Using FREEZE:
> done in 16.86 s (drop tables 0.20 s, create tables 0.01 s, client-side generate 11.86 s, vacuum 0.25 s, primary keys 4.53 s).

That looks good!

As COPY FREEZE was introduced in 9.3, this means that loading data would
break with previous versions. Pgbench attempts at being compatible with
older versions. I'm wondering whether we should not care or if we should
attempt some compatibility layer. It seems enough to test
"PQserverVersion() >= 90300"?

--
Fabien.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro Ikeda 2021-03-08 10:42:37 Re: About to add WAL write/fsync statistics to pg_stat_wal view
Previous Message Peter Eisentraut 2021-03-08 10:25:13 Re: pg_upgrade failing for 200+ million Large Objects