Skip to content

4.7.0

Latest

Choose a tag to compare

@okomarov okomarov released this 24 Oct 00:39
· 14 commits to main since this release

@steadybrew/postgresjs@4.7.0 stops transactions from committing half their work, and gives a handle used after release() or after its transaction ended its own error code. Nothing breaks unless your code checks for CONNECTION_ENDED to catch those handles.

npm install @steadybrew/postgresjs@4.7.0
  • A reserved connection used after release() rejects with CONNECTION_RELEASED, and a transaction handle used after its transaction ended, or while its COMMIT runs, with TRANSACTION_ENDED. CONNECTION_ENDED now means only that sql.end() was called.
  • A transaction no longer commits half its work when a statement in it fails before it is sent, such as one with an undefined value.
  • A transaction no longer commits half its work when you cancel one of its statements with query.cancel() before it is sent.

The switching tool, @steadybrew/postgresjs-migrate 0.2.0, gives advice that matches these codes.

See the changelog for details and upstream references.

Validation: CI passed on Node 22/24/26 × PostgreSQL 15–18, Deno and workerd (run); Workers CPU per connection no higher than 4.6.0 (run).