From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove server and libpq support for old FE/BE protocol version 2
Date: Thu, 04 Mar 2021 08:59:16 +0000
Message-ID: <E1lHjpE-0006Sn-CY@gemulon.postgresql.org> (raw)
Remove server and libpq support for old FE/BE protocol version 2.
Protocol version 3 was introduced in PostgreSQL 7.4. There shouldn't be
many clients or servers left out there without version 3 support. But as
a courtesy, I kept just enough of the old protocol support that we can
still send the "unsupported protocol version" error in v2 format, so that
old clients can display the message properly. Likewise, libpq still
understands v2 ErrorResponse messages when establishing a connection.
The impetus to do this now is that I'm working on a patch to COPY
FROM, to always prefetch some data. We cannot do that safely with the
old protocol, because it requires parsing the input one byte at a time
to detect the end-of-copy marker.
Reviewed-by: Tom Lane, Alvaro Herrera, John Naylor
Discussion: https://www.postgresql.org/message-id/9ec25819-0a8a-d51a-17dc-4150bb3cca3b%40iki.fi
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3174d69fb96a66173224e60ec7053b988d5ed4d9
Modified Files
--------------
doc/src/sgml/libpq.sgml | 79 +-
src/backend/access/common/printtup.c | 248 +----
src/backend/commands/async.c | 3 +-
src/backend/commands/copyfrom.c | 7 -
src/backend/commands/copyfromparse.c | 83 +-
src/backend/commands/copyto.c | 127 +--
src/backend/libpq/auth.c | 80 +-
src/backend/libpq/pqcomm.c | 215 ++--
src/backend/libpq/pqmq.c | 18 +-
src/backend/postmaster/postmaster.c | 42 +-
src/backend/tcop/dest.c | 22 +-
src/backend/tcop/fastpath.c | 165 +--
src/backend/tcop/postgres.c | 71 +-
src/backend/utils/error/elog.c | 64 +-
src/backend/utils/misc/guc.c | 6 +-
src/bin/psql/common.c | 10 -
src/bin/psql/copy.c | 4 +-
src/include/commands/copyfrom_internal.h | 3 +-
src/include/libpq/libpq.h | 7 +-
src/include/libpq/pqcomm.h | 33 +-
src/include/tcop/fastpath.h | 1 -
src/include/utils/elog.h | 2 -
src/interfaces/libpq/Makefile | 1 -
src/interfaces/libpq/fe-auth.c | 8 +-
src/interfaces/libpq/fe-connect.c | 160 +--
src/interfaces/libpq/fe-exec.c | 231 ++---
src/interfaces/libpq/fe-lobj.c | 50 +-
src/interfaces/libpq/fe-misc.c | 21 +-
src/interfaces/libpq/fe-protocol2.c | 1610 ------------------------------
src/interfaces/libpq/fe-protocol3.c | 6 +-
src/interfaces/libpq/libpq-fe.h | 2 +-
src/interfaces/libpq/libpq-int.h | 36 +-
src/interfaces/libpq/nls.mk | 2 +-
33 files changed, 303 insertions(+), 3114 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: heikki.linnakangas@iki.fi
Subject: Re: pgsql: Remove server and libpq support for old FE/BE protocol version 2
In-Reply-To: <E1lHjpE-0006Sn-CY@gemulon.postgresql.org>
References: <E1lHjpE-0006Sn-CY@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox