Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for negotiating the protocol version with the client #706

Open
JelteF opened this issue Mar 9, 2024 · 0 comments
Open

Add support for negotiating the protocol version with the client #706

JelteF opened this issue Mar 9, 2024 · 0 comments

Comments

@JelteF
Copy link

JelteF commented Mar 9, 2024

Is your feature request related to a problem? Please describe.

The postgres protocol spec includes a NegotiateProtocolVersion message type, which allows the server to tell the client that it only supports a.

There are quite some threads ongoing at postgres to bump the minor protocol version. If any of those get merged, then those clients would not be able to connect to an old pgcat version, because they would ask for protocol version 3.1

Describe the solution you'd like
Send the NegotiateProtocolVersion when the client requests a higher minor version.

Additional context

For reference this is the Postgres commit introducing NegotiateProtocolVersion: postgres/postgres@ae65f60

Also a PR for PgBouncer that adds the same functionality: pgbouncer/pgbouncer#1007

You can try this patchset to have libpq ask for a protocol version 3.1: https://www.postgresql.org/message-id/flat/CAGECzQScQ3N-Ykv2j4NDyDtrPPc3FpRoa%3DLZ-2Uj2ocA4zr%3D4Q%40mail.gmail.com#cd9e8407820d492e8f677ee6a67c21ce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant