You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
retryingListen function potentially leaks database connections. This patch ensures the connections are released in case of listen/notify errors.
(cherry picked from commit 00c7cb1)
Copy file name to clipboardExpand all lines: src/PostgREST/Observation.hs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,7 @@ data Observation
48
48
| DBListenRetryInt
49
49
| DBListenerGotSCacheMsgByteString
50
50
| DBListenerGotConfigMsgByteString
51
+
| DBListenerConnectionCleanupFailSomeException
51
52
| QueryObsMainQueryStatus
52
53
| ConfigReadErrorObsSQL.UsageError
53
54
| ConfigInvalidObsText
@@ -118,6 +119,8 @@ observationMessage = \case
118
119
"Received a schema cache reload message on the "<>show channel <>" channel"
119
120
DBListenerGotConfigMsg channel ->
120
121
"Received a config reload message on the "<>show channel <>" channel"
122
+
DBListenerConnectionCleanupFail ex ->
123
+
"Failed during listener connection cleanup: "<> showOnSingleLine '\t' (show ex)
121
124
QueryObs{} ->
122
125
mempty-- TODO pending refactor: The logic for printing the query cannot be done here. Join the observationMessage function into observationLogger to avoid this mempty.
0 commit comments