Skip to content

Rearm SimpleConnection after query errors - #796

Merged
josevalim merged 1 commit into
elixir-ecto:masterfrom
lukaszsamson:ls-fix-lost-notification-ping
Sep 9, 2026
Merged

Rearm SimpleConnection after query errors#796
josevalim merged 1 commit into
elixir-ecto:masterfrom
lukaszsamson:ls-fix-lost-notification-ping

Conversation

@lukaszsamson

Copy link
Copy Markdown
Contributor

After a successful simple query, the implementation invokes Protocol.checkin/1, which switches the socket back into active mode. The {:error, %Postgrex.Error{}, protocol} branch invoked handle_result/2 directly leaving socket in passive state. Impact: a recoverable SQL error stopped asynchronous notifications delivery on a healthy connection. It would self heal on the next successful query
This PR tries to checkin the connection on error, and if that fails disconnects.

@josevalim
josevalim merged commit 049c453 into elixir-ecto:master Sep 9, 2026
12 of 13 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

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

Successfully merging this pull request may close these issues.

2 participants