git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ce1e7a2) | patch
Don't let libpq PGEVT_CONNRESET callbacks break a PGconn.
2022年2月18日 16:43:04 +0000 (11:43 -0500)
2022年2月18日 16:43:04 +0000 (11:43 -0500)
commit 2e372869aa38a9d6e4552c192da4454b17e01e38
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
doc/src/sgml/libpq.sgml diff | blob | blame | history
src/interfaces/libpq/fe-connect.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /