| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | nadav(at)tailorbrands(dot)com |
| Cc: | pgpool-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Removing support for FE/BE protocol version 2 |
| Date: | 2026-10-05 05:43:22 |
| Message-ID: | 20261005.144322.1638770792198231942.ishii@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-hackers |
>> 0001:
>>
>> - pool_error_code("0X000") looks like a typo. ERRCODE_FEATURE_NOT_SUPPORTED
>> is "0A000".
>
> Thanks for pointing it out. You are right.
>
>> - PostgreSQL's message for this case is "unsupported frontend protocol
>> %u.%u: server supports %u.0 to %u.%u". If the goal is the same
>> behavior as PostgreSQL, maybe we could use the same text.
>
> Unfortunately at this point pgpool has not connected to backend
> yet. Until connected to backend, pgpool does not know what range of
> protocol versions are supported by the backend. Therefore, pgpool
> cannot generate exactly the same message as PostgreSQL.
Since we cannot send v3 error response message to v2 frontend, I end
up with the code below:
+ case PROTO_MAJOR_V2: /* V2 protocol is not supported */
+ ereport(FATAL,
+ (errmsg("FATAL: unsupported frontend protocol %u.%u",
+ sp->major, sp->minor)));
>> Two more things:
>>
>> - A regression test that sends a v2 startup packet and checks that we
>> get the FATAL error. It's small, and it covers the only v2 code path
>> we keep.
>
> Yes, for the purpose, we need to create a small v2 client.
I include this as v2-0003-Modify-pgproto-as-a-test-driver.patch. I
modified pgproto to add "-t" option ("test-v2" as a long option),
which just sends a v2 startup packet and reads response from pgpool,
and exits. regression test "045.remove_proto_v2" is added.
Other than above, I ran pgindent and fix Copyright notice in passing.
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Reject-v2-protocol-startup-packet.patch | application/octet-stream | 2.0 KB |
| v2-0002-Remove-v2-protocol-processing-in-process-reportin.patch | application/octet-stream | 14.9 KB |
| v2-0003-Modify-pgproto-as-a-test-driver.patch | application/octet-stream | 16.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Koshino Taiki | 2026-10-05 07:36:30 | Preserve dml_adaptive state on ROLLBACK TO SAVEPOINT |
| Previous Message | Tatsuo Ishii | 2026-10-02 13:21:27 | Re: Removing support for FE/BE protocol version 2 |