Re: Removing support for COPY FROM STDIN in protocol version 2

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Removing support for COPY FROM STDIN in protocol version 2
Date: 2021-02-04 11:00:05
Message-ID: 6d6dcead-71fa-d9f6-4aaa-41104af0f27c@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/02/2021 08:54, Michael Paquier wrote:
> On Wed, Feb 03, 2021 at 11:29:37AM -0500, Tom Lane wrote:
>> Then let's kill it dead, server and libpq both.
>
> Yeah.

Ok, here we go.

One interesting thing I noticed while doing this:

Up until now, we always used the old protocol for errors that happened
early in backend startup, before we processed the client's protocol
version and set the FrontendProtocol variable. I'm sure that made sense
when V3 was introduced, but it was a surprise to me, and I didn't find
that documented anywhere. I changed it so that we use V3 errors, if
FrontendProtocol is not yet set.

However, I kept rudimentary support for sending errors in protocol
version 2. This way, if a client tries to connect with an old client, we
still send the "unsupported frontend protocol" error in the old format.
Likewise, I kept the code in libpq to understand v2 ErrorResponse
messages during authentication.

- Heikki

Attachment Content-Type Size
0001-Remove-server-and-libpq-support-for-old-FE-BE-protoc.patch text/x-patch 144.9 KB
0002-Simplify-COPY-FROM-parsing-by-forcing-lookahead.patch text/x-patch 9.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-02-04 11:28:46 Re: Is Recovery actually paused?
Previous Message David Rowley 2021-02-04 10:51:39 Re: Tid scan improvements