-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Today it is possible that a notification from the backend is missed and recv/get_event sleep until the entire timout, even as the awaited value is present in the database.
Consider this scenario:
- Postgres emit a notification on the connection opened with the application
- Postgres crashes before the notification is sent on the wire
- Postgres restart, the notification connection is re-established (by error handling on the application side), but never re-emit the notification
- The application is never notified.
In TypeScript, we handle this by periodically polling Postgres. In Golang, we have a mechanism for the listener loop to signal, through a channel, all the consumers that they should read from the database because the listener connection was lost.
Ideally we'd implement the later in Python.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels