pgsql: libpq: Fix error messages when server rejects SSL or GSS

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: libpq: Fix error messages when server rejects SSL or GSS
Дата
Msg-id E1s1Si1-000dPG-5o@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
libpq: Fix error messages when server rejects SSL or GSS

These messages were lost in commit 05fd30c0e7. Put them back.

This makes one change in the error message behavior compared to v16,
in the case that the server responds to GSSRequest with an error
instead of rejecting it with 'N'. Previously, libpq would hide the
error that the server sent, assuming that you got the error because
the server is an old pre-v12 version that doesn't understand the
GSSRequest message. A v11 server sends a "FATAL: unsupported frontend
protocol 1234.5680: server supports 2.0 to 3.0" error if you try to
connect to it with GSS. That was a reasonable assumption when the
feature was introduced, but v12 was released a long time ago and I
don't think it's the most probable cause anymore. The attached patch
changes things so that libpq prints the error message that the server
sent in that case, making the "server responds with error to
GSSRequest" case behave the same as the "server responds with error to
SSLRequest" case.

Reported-by: Peter Eisentraut
Discussion: https://www.postgresql.org/message-id/bb3b94da-afc7-438d-8940-cb946e553d9d@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/87d2801d4b247b85b70553e43b7e6db0a1e9e7cb

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 49 ++++++++++++++++++++++++++++-----------
1 file changed, 35 insertions(+), 14 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Make two-phase tests of ECPG and main suite more concurrent-proo
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: Close race condition between datfrozen and relfrozen updates.