pgsql: Don't let libpq PGEVT_CONNRESET callbacks break a PGconn.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Don't let libpq PGEVT_CONNRESET callbacks break a PGconn.
Дата
Msg-id E1nL6Lo-0006pO-Oy@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Don't let libpq PGEVT_CONNRESET callbacks break a PGconn.

As currently implemented, failure of a PGEVT_CONNRESET callback
forces the PGconn into the CONNECTION_BAD state (without closing
the socket, which is inconsistent with other failure paths), and
prevents later callbacks from being called.  This seems highly
questionable, and indeed is questioned by comments in the source.

Instead, let's just ignore the result value of PGEVT_CONNRESET
calls.  Like the preceding commit, this converts event callbacks
into "pure observers" that cannot affect libpq's processing logic.

Discussion: https://postgr.es/m/3185105.1644960083@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e372869aa38a9d6e4552c192da4454b17e01e38

Modified Files
--------------
doc/src/sgml/libpq.sgml           | 11 +++++------
src/interfaces/libpq/fe-connect.c | 28 ++++++----------------------
2 files changed, 11 insertions(+), 28 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Suppress warning about stack_base_ptr with late-model GCC.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Add support for building with ZSTD.