-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
Describe the issue
Closing PostgreSQL connection deadlocks listen(_:)
Vapor version
latest
Operating system and version
macOS 26.01
Swift version
Swift 6.2
Steps to reproduce
Reproduction:
-
The code looks like that:
try await self.postgresClient.withConnection { connection in 148: log.debug("Notifications: Starting listening", metadata: [ "topic": "\(topic)", "psql.conn.id": "\(connection.id)", "psql.conn.isClosed": "\(connection.isClosed)" ]) sequence = try await connection.listen(topic.stringValue) 154: log.debug("Notifications: Now listening", metadata: [ "topic": "\(topic)", "psql.conn.id": "\(connection.id)", "psql.conn.isClosed": "\(connection.isClosed)" ]) -
brew services restart postgresql
-
The error log similar to the log above gets generated, and the system goes into a deadlock.
Outcome
client goes to infinite waiting
Additional notes
Hash a PR for the fix #600
Metadata
Metadata
Assignees
Labels
No labels