Replace platform specific syscalls for non-blocking IO with more traditional goroutines and deadlines. This returns to the v4 approach with some additional improvements and fixes. This restores the ability to use a pgx.Conn over an ssh.Conn as well as other non-TCP or Unix socket connections. In addition, it is a significantly simpler implementation that is less likely to have cross platform issues.
Optimization: The default type registrations are now shared among all connections. This saves about 100KB of memory per connection. pgtype.Type and pgtype.Codec values are now required to be immutable after registration. This was already necessary in most cases but wasn't documented until now. (Lev Zakharov)
Fix: Ensure pgxpool.Pool.QueryRow.Scan releases connection on panic
CancelRequest: don't try to read the reply (Nicola Murino)
Fix: correctly handle bool type aliases (Wichert Akkerman)
Fix: pgconn.CancelRequest: Fix unix sockets: don't use RemoteAddr()
Fix: pgx.Conn memory leak with prepared statement caching (Evan Jones)
Add BeforeClose to pgxpool.Pool (Evan Cordell)
Fix: various hstore fixes and optimizations (Evan Jones)
Fix: RowToStructByPos with embedded unexported struct
Support different bool string representations (Lev Zakharov)
Fix: error when using BatchResults.Exec on a select that returns an error after some rows.
Fix: pipelineBatchResults.Exec() not returning error from ResultReader
Fix: pipeline batch results not closing pipeline when error occurs while reading directly from results instead of using
a callback.
Fix: scanning a table type into a struct
Fix: scan array of record to pointer to slice of struct
Fix: handle null for json (Cemre Mengu)
Batch Query callback is called even when there is an error
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps github.com/jackc/pgx/v5 from 5.3.1 to 5.4.0.
Changelog
Sourced from github.com/jackc/pgx/v5's changelog.
Commits
461b9fa
Release v5.4.045520d5
Document pgtype.Map and pgtype.Type are immutable after registration90f9aad
add singleton pgtype.Map for default type mappings5f28621
Add docs clarifying that FieldDescriptions may return nilc542df4
added MarshalJSON and UnmarshalJSON to timestamp and added their tests (based...34eddf9
Increase slowWriteTimer to 15ms and document why5d4f901
failed to write startup message error should be normalized482e56a
Fix race condition when CopyFrom is cancelled.3ea2f57
Deprecate CheckConn in favor of Ping26c79eb
Handle writes that could deadlock with reads from the serverDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)