You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go.mod: bump pgx to v5.9.2 for OAuthTokenProvider support
Bumps github.com/jackc/pgx/v5 from v5.7.2 to v5.9.2. The primary
motivation is that v5.9.2 adds OAuthTokenProvider to pgconn.Config,
enabling native OAUTHBEARER SASL client support.
Four compatibility fixes are required:
1. pgconn.PgConn.SecretKey() now returns []byte instead of uint32,
supporting the new PostgreSQL protocol v3.2 variable-length cancel
key. The sqlproxy cancel tests recover the original uint32 using
binary.BigEndian.Uint32() since the proxy always sends a 4-byte
key.
2. pgconn now returns a "conn closed" error from its internal state
machine when operations are attempted on an already-closed
connection, rather than propagating the OS-level "connection reset
by peer" or "unexpected EOF". Two regex assertions in sqlproxy
tests are updated to accept all three forms.
3. pgxpool.Config.BeforeAcquire is deprecated in v5.9.2 in favor of
PrepareConn, which has the same semantics but also returns an
error. The workload pool setup is migrated accordingly.
4. pgx v5.9.2 enforces the PostgreSQL pipeline protocol more strictly:
ReadyForQuery must be sent after Sync, not after each Execute.
TestPipelineMetric's fake server was sending ReadyForQuery after
each Execute (via finishQuery(execPortal)), which worked with
v5.7.2's lenient pipeline reader but fails with v5.9.2. Two new
test helpers (expectExecPortalPipelined, expectSyncAndSendReadyForQuery)
correctly simulate the pipeline response sequence.
Closes#171149Closes#169280
Informs: CRDB-64341
Epic: CRDB-60766
Release note: None
0 commit comments