Re: Removing support for COPY FROM STDIN in protocol version 2 - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Removing support for COPY FROM STDIN in protocol version 2
Date
Msg-id 6d6dcead-71fa-d9f6-4aaa-41104af0f27c@iki.fi
Whole thread Raw
In response to Re: Removing support for COPY FROM STDIN in protocol version 2  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Removing support for COPY FROM STDIN in protocol version 2
List 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

pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Tid scan improvements
Next
From: Bharath Rupireddy
Date:
Subject: Re: Is Recovery actually paused?