Re: Using COPY FREEZE in pgbench

From: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
To: coelho(at)cri(dot)ensmp(dot)fr
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Using COPY FREEZE in pgbench
Date: 2021-03-08 11:52:41
Message-ID: 20210308.205241.1956838193476165309.t-ishii@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Hi Fabien,
>
>> 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"?
>
> Good point.
>
> Unfortunately with pre-14 COPY FREEZE we cannot get the speed up
> effect because it requires the commit:
> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7db0cd2145f2bce84cac92402e205e4d2b045bf2
> which was there only in the master branch as of Jan 17, 2021.
>
> So I think adding "freeze" to the copy statement should only happen in
> PostgreSQL 14 or later. Probably the test should be
> "PQserverVersion() >= 140000" I think. Attached is the patch doing
> what you suggest.

I have created a CommitFest entry for this.
https://commitfest.postgresql.org/33/3034/

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2021-03-08 12:33:58 Re: pg_upgrade failing for 200+ million Large Objects
Previous Message Andy Fan 2021-03-08 11:39:28 Re: Huge memory consumption on partitioned table with FKs