for TxAccessMode, TxDeferrableMode and TxIsoLevel
After this commit, Godoc understands these are the valid values of these
types and shows them together in the documentation.
Otherwise the health check and the create initial connection(s) may both
create connections. While this generally wouldn't be a real problem it
did cause TestPoolBackgroundChecksMinConns to flicker on CI.
function whether expected or not, rather than continue and try to
compare invalid decoded results.
Extend the unit test slightly to check the header.
Remove go-test/deep dependency in favour of standard library reflect
package.
Hex encoding the Data field in the SASL responses made debugging SCRAM
more difficult than actually helping.
Before:
F{"Type":"SASLResponse","Data":"633d655377732c723d4d4d4e4e6d666b536f5862694a68385833466d324f2b4d77787354692f4550753052414157484b7a306b7376336c5747392f4d4a5267504d2c703d616742664b533164383937674b4f4a6d4c7171626c49326b6b4a506f2b58354359516c63473458357657343d"}
F{"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"792c2c6e3d2c723d4d4d4e4e6d666b536f5862694a68385833466d324f2b4d77"}
After:
F{"Type":"SASLResponse","Data":"c=eSws,r=9dR43UQLL1KbrKKl4/QbxjqgVjZYR9mqnx3rFBiI7R/1pp5oeVYMGhXj,p=b2hmuvTvWn2xN0fclm+O4TwLAarRM8xoHSN7jsKDHAU="}
F{"Type":"SASLInitialResponse","AuthMechanism":"SCRAM-SHA-256","Data":"y,,n=,r=9dR43UQLL1KbrKKl4/Qbxjqg"}
This change introduces a new zerologadapter that allows
users to pass the actual logger via context.Context. Especially HTTP
middleware might choose to use `(*zerolog.Logger).WithContext` and
`zerolog.Ctx`. Allowing users to extract the logger from the context
keeps the full enriched logger available when pgx emits logs.
WithContextFunc adds possibility to get request scoped values from the
ctx.Context before logging lines.
WithoutPGXModule disables adding module:pgx to the default logger context.