On Wed, 14 Aug 2024 at 19:37, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> - to 0005 I change your pqTraceOutputEncryptionRequestResponse()
> function name to pqTraceOutputCharResponse and instead of attaching
> the "Response" literal in the outpuer to the name given in the
> function call, just pass the whole string as argument to the function.
Fine by me
> - to 0006 I change function name pqFinishParsingMessage() to
> pqParseDone() and reworded the commentary; also moved it to fe-misc.c.
> Looks good otherwise.
The following removed comments seems useful to keep (I realize I
already removed them in a previous version of the patch, but I don't
think I did that on purpose)
- /* Drop the processed message and loop around for another */
- /* consume the message and exit */
- /* Completed this message, keep going */
- /* trust the specified message length as what to skip */
> - 0008 to fix NegotiateProtocolVersion looks correct per [1], but I
> don't know how to test it. Suggestions?
Two options:
1. Manually change code to make sure SendNegotiateProtocolVersion is
called in src/backend/tcop/backend_startup.c
2. Apply my patches from this thread[2] and use
max_protocol_version=latest in the connection string while connecting
to an older postgres server.
[2]:
https://www.postgresql.org/message-id/flat/CAGECzQTyXDNtMXdq2L-Wp%3DOvOCPa07r6%2BU_MGb%3D%3Dh90MrfT%2BfQ%40mail.gmail.com#1b8cda3523555aafae89cc04293b8613