Skip to content

PostgresNIO 1.18.0

Compare
Choose a tag to compare
@fabianfett fabianfett released this 28 Aug 08:37
· 80 commits to main since this release
0d9f13b

🚀 This PostgresNIO release adds a number of changes that allow users to fully embrace structured concurrency:

  1. Prepared statement async/await support
  2. Notification listen async/await support
  3. Users don't need to provide EventLoops when creating a connection

🚨 This release changes the behavior of PostgresConnection.close(). Before this release a call to close() triggered a graceful shutdown of the connection. This means that all previously enqueued queries got executed before the connection was closed. Starting with 1.18.0 close() leads to a direct connection closure cancelling the running and all queued queries. This change is necessary to get rid of connections to servers where the server stopped responding. The previous behavior can be achieved using the new closeGracefully() function on PostgresConnection.

SemVer Minor

  • Add async listen; Refactor all listen code (#264, #392)
  • Add PostgresDynamicTypeThrowingEncodable and PostgresDynamicTypeEncodable (#365, patch credit to @marius-se)
  • Use EventLoop provided by SwiftNIO's MultiThreadedEventLoopGroup.singleton (#389, patch credit to @tkrajacic)
  • async/await prepared statement API (#390, patch credit to @mariosangiorgio)
  • close() closes immediately; Add new closeGracefully() (#383, #397, #400)

SemVer Patch

  • Use variadic generics in Swift 5.9 (#341)
  • Crash fix: Multiple bad messages could trigger reentrancy issue (#379)
  • Move PostgresFrontendMessage to tests (#381, #395, #399)
  • PostgresBackendMessage.ID should be backed by UInt8 directly (#386)
  • Remove PrepareStatementStateMachine (#391)
  • Fix a few inaccurate or confusing precondition failure messages (#398)

Other Changes

  • Fix multiple warnings generated by the documentation build (#378)
  • Typo: Storiage -> Storage (#387)
  • Use README header image compatible with light/dark mode (#393)