Re: Is it safe to use the extended protocol with COPY?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is it safe to use the extended protocol with COPY?
Date: 2021-09-02 18:09:57
Message-ID: CA+TgmoYhD7n_cnFfq088nVrJC=JW2U0kfrkXd1y+LMU6Ew5dYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 1, 2021 at 2:43 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> writes:
> > Someone [1] has pointed out this conversation [2] which suggests that
> > COPY with extended protocol might break in the future.
>
> As was pointed out in that same thread, the odds of us actually
> breaking that case are nil. I wouldn't recommend changing your
> code on this basis.

I agree that there doesn't seem to be an risk of a wire protocol
change in the near future, but it might still be a good idea to change
any code that does this on the grounds that the current wire protocol
makes reliable error handling impossible - unless you wait to send
Sync until you see how the server responds to the earlier messages.[1]

[1] https://www.postgresql.org/message-id/CA%2BTgmoa4eA%2BcPXaiGQmEBp9XisVd3ZE9dbvnbZEvx9UcMiw2tg%40mail.gmail.com

--
Robert Haas
EDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2021-09-02 18:20:36 Read-only vs read only vs readonly
Previous Message Jacob Champion 2021-09-02 17:13:35 Re: [PATCH] support tab-completion for single quote input with equal sign