| From: | Nadav Shatz <nadav(at)tailorbrands(dot)com> |
|---|---|
| To: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
| Cc: | pgpool-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Removing support for FE/BE protocol version 2 |
| Date: | 2026-10-13 11:49:43 |
| Message-ID: | CACeKOO1VaYvmj-VZNiWfwLynwfY4uX-cHPA-OvjCrK8U19XNHw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-hackers |
Hi,
Thanks for v5!
Agreed on handling protoMajor/protoMinor in pool_get_cp() as a
separate patch.
One small leftover: the 010 test stub
(src/test/regression/tests/010.rewrite_timestamp/timestamp/main.c)
still defines pool_get_major_version(). Nothing calls it anymore, so it
can be removed. You can do that when committing; no need for v6.
Also, a reminder about the incompatibility item in the 4.8 release
notes.
Other than that, v5 looks good to me.
Thanks for the hard work on this!
Best,
On Tue, Oct 13, 2026 at 6:54 AM Tatsuo Ishii <ishii(at)postgresql(dot)org> wrote:
> Hi Nadav,
>
> > Hi,
> >
> > Thanks for v4. I applied it on master. The build is clean (no new
> > warnings, also with -Wextra and -Wunused-parameter), the full
> > regression suite passes on PG16 (80/80), and 045 passes. On the wire
> > the reply is 'E' + "FATAL: unsupported frontend protocol 2.0\n" +
> > '\0', and the log has a single FATAL line. All the v3 points are fixed.
> >
> > Since we are now removing the protoMajor-specific code entirely, here
> > is what is still left. None of it is a bug:
> >
> > - pool_hba.c (around lines 1342 and 1380): two
> > "frontend->protoVersion == PROTO_MAJOR_V3" checks that are now
> > always true. This file was on your original list.
>
> Oops. I forgot it. Will fix.
>
> > - child.c (around line 1031): "new_sp->major == PROTO_MAJOR_V3 &&
> > sp->application_name".
>
> Will fix.
>
> > - The MAJOR() macro in pool.h has no callers now. So
> > pool_get_major_version(), pool_set_major_version() (called only from
> > child.c) and session_context->major are dead too, as is the
> > pool_get_major_version() stub in the 010 test.
>
> Agreed on removing these.
>
> > - pool_get_cp() and pool_discard_cp() still take protoMajor and compare
> > it with sp->major. It is harmless, but the argument could be dropped
> > along with the rest.
>
> I would like to keep the protoMajor for now.
>
> Now clients can use protocol 3.0 or 3.2. So comparing protoMajor in
> pool_get_cp() is not sufficient. It needs to compare protoMinor as
> well. I would like to fix this in a separate patch since this is not
> related to dropping v2 support.
>
> > - pool.h: sbuf/sbufsz in POOL_CONNECTION are now only initialized and
> > freed in pool_stream.c. Their only user was pool_read_string(), which
> > is gone (the comment still says "buffer for pool_read_string").
>
> I will remove them.
>
> > - pgproto/read.c:411 still uses %m.
>
> Will fix.
>
> > - pgproto/send.c write_it(): "int errsave = errno;" needs pgindent
> > (alignment and a blank line after the declaration).
>
> Yeah. There are tons of places that need pgindent. We will run
> pgindent on whole source files before GA is out.
>
> > - pool_proto_modules.h: the header comment ends with a dangling comma
> > ("pool_proto_modules.c,"), and there is a double blank line after
> > log_backend_messages().
>
> Will fix.
>
> > Other than these, the patches look good to me. Doing the items above in
> > a follow-up commit is probably fine too.
>
> I have left the pool_get_cp() and pool_discard_cp() issue as described
> above. Other than that, attached v5 should address all the problems
> you pointed out.
>
> Thank you so much for your review!
> --
> Tatsuo Ishii
> SRA OSS K.K.
> English: http://www.sraoss.co.jp/index_en/
> Japanese:http://www.sraoss.co.jp
>
--
Nadav Shatz
Tailor Brands | CTO
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-10-13 23:00:04 | Re: Removing support for FE/BE protocol version 2 |
| Previous Message | Tatsuo Ishii | 2026-10-13 03:53:58 | Re: Removing support for FE/BE protocol version 2 |