From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Remove server and libpq support for old FE/BE protocol version 2 |
Date: | 2021-03-04 08:59:16 |
Message-ID: | E1lHjpE-0006Sn-CY@gemulon.postgresql.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-03-04 09:24:40 | pgsql: Remove redundant getenv() for PGUSER, in psql help. |
Previous Message | Daniel Gustafsson | 2021-03-04 08:32:23 | Re: pgsql: pg_upgrade: Check version of target cluster binaries |