Re: Using COPY FREEZE in pgbench

Tatsuo Ishii <ishii@sraoss.co.jp>

From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: coelho@cri.ensmp.fr
Cc: pgsql-hackers@lists.postgresql.org
Date: 2021-07-04T08:31:56Z
Lists: pgsql-hackers

Attachments

Hi fabien,

>> So overall gain by the patch is around 15%, whereas the last test
>> before the commit was 14%.  It seems the patch is still beneficial
>> after the commit.
> 
> Yes, that's good!

Yeah!

> I had a quick look again, and about the comment:
> 
>  /*
>   * If partitioning is not enabled and server version is 14.0 or later, we
>   * can take account of freeze option of copy.
>   */
> 
> I'd suggest instead the shorter:
> 
>  /* use COPY with FREEZE on v14 and later without partioning */
> 
> Or maybe even to fully drop the comment, because the code is clear
> enough and the doc already says it.

I'd prefer to leave a comment. People (including me) tend to forget
things in the future, that are obvious now:-)

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

Commits

  1. Use COPY FREEZE in pgbench for faster benchmark table population.

  2. Revert most of 39b66a91bd

  3. Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE