mirror of
https://github.com/postgres/postgres.git
synced 2025-05-30 00:02:11 -04:00
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