The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
PostgresNIO 1.19.1
2 weeks ago
### [SPI](https://github.com/apple/swift/blob/main/docs/ReferenceGuides/UnderscoredAttributes.md#_spispiname)(ConnectionPool) changes
- Fixes Crash in ConnectionPoolStateMachine (#438)
### Other Changes
- Update README.md (#434)
PostgresNIO 1.19.0
4 weeks ago
What is better than one PostgresConnection? Multiple PostgresConnections! This is why PostgresNIO now features an experimental
`PostgresClient` that is backed by a new `ConnectionPool` implementation.
The new `PostgresClient` and its underlying `ConnectionPool` implementation are large new features that are in an *early experimental* stage. We encourage PostgresNIO users to try them and provide feedback. The implementation is so new, and the feature scope so large, that we don't make any API stability promises for `PostgresClient` yet; it is therefore exposed as an [SPI] import.
If you want to start playing with the new `PostgresClient`, start with a pattern like this:
```swift
@_spi(ConnectionPool) import PostgresNIO
let client = PostgresClient(configuration: configuration, logger: logger)
await withTaskGroup(of: Void.self) {
taskGroup.addTask {
// π¨ The PostgresClient only works if its `run()` method is executed in a long-running task.
// This ensures that all background work shall be executed in a way that plays
// nicely with structured concurrency.
client.run()
}
taskGroup.addTask {
client.withConnection { connection in
do {
let rows = try await connection.query("SELECT userID, name, age FROM users;")
for try await (userID, name, age) in rows.decode((UUID, String, Int).self) {
// do something with the values
}
} catch {
// handle errors
}
}
}
}
```
We are currently working with the [`ServiceLifecycle`][cycle] maintainers to enable simple integration (however, we do not intend to depend on `ServiceLifecycle` directly).
If you run into any problems, please [open a new Issue][issue].
### [SPI][SPI](ConnectionPool) changes
- Add new `ConnectionPoolModule`, `PostgresClient` (#412, #416, #417, #418, #419, #420, #421, #422, #424, #425, #426, #427, #428, #429, #430)
### SemVer Minor
- Fix `PostgresDecodable` inference for `RawRepresentable` enums (#423, patch credit to @MahdiBM)
- Remove warn-concurrency warnings (#408)
- Update minimum Swift requirement to 5.7 (#414)
### Other Changes
- Update SSWG Graduation Level (#409)
[SPI]: https://github.com/apple/swift/blob/main/docs/ReferenceGuides/UnderscoredAttributes.md#_spispiname
[cycle]: https://github.com/swift-server/swift-service-lifecycle
[issue]: https://github.com/vapor/postgres-nio/issues/new/choose
PostgresNIO 1.18.1
12 weeks ago
PostgresNIO `1.18.0` introduced an issue that could lead to Segmentation faults when using the Swift 5.8 compiler. This patch works around the underlying Swift compiler bug.
### SemVer Patch
- Fix Segmentation faults in Swift 5.8 (#406)
### Other Changes
- Improve the logo image used by the DocC catalog (#404)
PostgresNIO 1.18.0
13 weeks ago
π 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)
PostgresNIO 1.17.0
18 weeks ago
### SemVer Minor
* Ensure `PostgresConnection.Configuration.TLS` is concurrency safe by making property `disable` computed (#376, patch credit to @sidepelican)
### New Contributors
* @sidepelican made their first contribution in https://github.com/vapor/postgres-nio/pull/376
PostgresNIO 1.16.0
24 weeks ago
### Semver Minor
* Add many, many missing types to `PostgresDataType` (#371)
* Add `PSQLError` `debugDescription` (#372)
**Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.15.0...1.16.0
PostgresNIO 1.15.0
25 weeks ago
### SemVer Minor
* Make PostgresCodable typealias public (https://github.com/vapor/postgres-nio/pull/363)
* Add support for int4range, int8range, int4range[], int8range[] (https://github.com/vapor/postgres-nio/pull/330 by @rausnitz)
### SemVer Patch
* Decode `.bpchar` as `String` (https://github.com/vapor/postgres-nio/pull/368)
* Rename generic type from B to Bound in PostgresRange (https://github.com/vapor/postgres-nio/pull/367)
### Other Changes
* Various cleanups to CI (https://github.com/vapor/postgres-nio/pull/359, https://github.com/vapor/postgres-nio/pull/362, https://github.com/vapor/postgres-nio/pull/369)
* Add `testSelectActiveConnection` test (https://github.com/vapor/postgres-nio/pull/364)
* Add Postgres 15 to docker compose (https://github.com/vapor/postgres-nio/pull/366 by @marius-se)
### New Contributors
* @marius-se made their first contribution in https://github.com/vapor/postgres-nio/pull/366
**Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.14.2...1.15.0
PostgresNIO 1.14.2
29 weeks ago
Address CVE-2023-31136 - PostgresNIO processes unencrypted bytes from man-in-the-middle. See the [CVE-2023-31136 security advisory](https://github.com/vapor/postgres-nio/security/advisories/GHSA-9cfh-vx93-84vv) for details.
Thanks to PostgreSQL's Tom Lane <[
[email protected]](mailto:
[email protected])> for reporting this issue!
PostgresNIO 1.14.1
29 weeks ago
### SemVer Patch
* Use `#fileID` and `#filePath` instead of `#file` (#348, #355)
* Fix crash in row streams that are cancelled and timeout (#347, #351, #353)
* Add PostgresRow decoding tests, reformat Package.swift (#346)
### Other Changes
* Update README (#344, #345)
**Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.14.0...1.14.1
PostgresNIO 1.14.0
31 weeks ago
### SemVer Minor
* Make `PostgresBindings.append(PostgresData)` public (#332)
* Drop support for Swift 5.5 (#336)
* Mark `RowDescription.Column` (#338)
* Make `PSQLError` public (#342)
* Deprecating PostgresDataConvertible, PostgresMessageType (#313)
* Add support for UDS and existing Channels (#335)
### SemVer Patch
* Require new swift-nio versions (#343)
### Other changes
* Update CI in preparation for bumping to 5.6 min version (#337)
**Full Changelog**: https://github.com/vapor/postgres-nio/compare/1.13.0...1.14.0