pg.ddx.io  pgpool-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tatsuo Ishii <ishii@postgresql.org>
To: pgpool-committers@lists.postgresql.org
Subject: pgpool: Feature: remove frontend/backend protocol v2 support.
Date: Fri, 06 Nov 2026 10:59:56 +0000
Message-ID: <E1xPHfo-0000000GDlP-41ie@gothos.postgresql.org> (raw)

Feature: remove frontend/backend protocol v2 support.

PostgreSQL removed v2 protocol support in version 14, which was
released in 2021.  The last version supporting protocol version 2 was
13, which was EOLed in November 2025. So supported PostgreSQL versions
at this point do not accept the protocol version 2 anymore (more
precisely, they response with "unsupported protocol version" error
when the protocol is requested).

This commit removes frontend/backend protocol v2 support from
Pgpool-II 4.8 and later. Previous versions still support v2 protocol.

In the code level, followings are done in this commit:

- Reject v2 protocol startup packet. If v2 frontend connects, raise a
  FATAL error.

- Remove all v2 protocol branches except some codes in elog.c throwing
  v2 error messages. Also fix some existing bugs with it.

- Remove the protocol major number argument from many functions.

- Remove src/protocol/pool_proto2.c, which handled v2 protocol messages.

- Remove MAJOR() macro.

- Remove pool_get_major_version() and pool_get_minor_version() family
  functions. Also Remove member "major" and "minor" in
  pool_session_context.h, that were used by these functions.

- Remove pool_read_string() in pool_stream.c, which was only used by
  v2 protocol path. Also remove "sbuf" and "sbufsz" in POOL_CONNECTION
  which was used by pool_read_string().

Author: Tatsuo Ishii <ishii@postgresql.org>
Reviewed-by: Nadav Shatz <nadav@tailorbrands.com>
Discussion: https://www.postgresql.org/message-id/20260625.151428.1666276852188903568.ishii%40postgresql.org
Backpatch-through: master only

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=6c189588c34ea55d69356e9fa6c4e8fa120b3...

Modified Files
--------------
src/Makefile.am                                    |    1 -
src/auth/pool_auth.c                               |  344 +++---
src/auth/pool_hba.c                                |   54 +-
src/context/pool_query_context.c                   |   12 +-
src/context/pool_session_context.c                 |   52 +-
src/include/context/pool_session_context.h         |    8 -
src/include/pool.h                                 |   19 -
src/include/protocol/pool_process_query.h          |   18 +-
src/include/protocol/pool_proto_modules.h          |   66 +-
src/include/utils/pool_stream.h                    |    3 +-
src/protocol/CommandComplete.c                     |    4 +-
src/protocol/child.c                               |   66 +-
src/protocol/pool_process_query.c                  | 1142 +++++++-------------
src/protocol/pool_proto2.c                         |  741 -------------
src/protocol/pool_proto_modules.c                  |  848 +++++----------
src/query_cache/pool_memqcache.c                   |    4 +-
src/rewrite/pool_lobj.c                            |    6 +-
src/rewrite/pool_timestamp.c                       |    4 +-
src/streaming_replication/pool_worker_child.c      |    2 +-
.../tests/010.rewrite_timestamp/timestamp/main.c   |    9 +-
src/tools/pgindent/typedefs.list                   |    1 -
src/utils/error/elog.c                             |   23 +-
src/utils/pool_process_reporting.c                 |  373 ++-----
src/utils/pool_relcache.c                          |    2 +-
src/utils/pool_stream.c                            |  257 +----
25 files changed, 1019 insertions(+), 3040 deletions(-)



Message-ID: <E1xPHfo-0000000GDlP-41ie@gothos.postgresql.org>
Permalink:  ../E1xPHfo-0000000GDlP-41ie@gothos.postgresql.org/
Also on:    postgresql.org/message-id/E1xPHfo-0000000GDlP-41ie@gothos.postgresql.org

 · 

reply

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: pgpool-committers@postgresql.org
  Cc: ishii@postgresql.org
  Subject: Re: pgpool: Feature: remove frontend/backend protocol v2 support.
  In-Reply-To: <E1xPHfo-0000000GDlP-41ie@gothos.postgresql.org>
  References: <E1xPHfo-0000000GDlP-41ie@gothos.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