Re: Removing useless \. at the end of copy in pgbench - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Removing useless \. at the end of copy in pgbench
Date
Msg-id 20180728.120307.1134923282983882586.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: Removing useless \. at the end of copy in pgbench  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Tatsuo Ishii <ishii@sraoss.co.jp> writes:
>> While populating pgbench_account table by using COPY FROM STDIN,
>> pgbench sends out "\." at the end of the copy data. However this is
>> only necessary in the version 2 of frontend/backend protocol (i.e. the
>> version 3 protocol does not need it). I think we can safely remove the
>> code to save a few CPU cycle since we only support back to PostgreSQL
>> 9.3 and the version 3 protocol has been supported since 7.4.
> 
> What exactly is the benefit of breaking compatibility with old servers?
> Saving a few cycles during initial table population seems like it could
> not be of interest to anyone.

Then we can do protocol version checking to not break backward
compatibility. I believe this is what psql does. So this will bring a
benefit to make our clients more consistent.

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


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables
Next
From: Tom Lane
Date:
Subject: Bizarre behavior in libpq's searching of ~/.pgpass