Results 346 comments of Jack Christensen

You want to set `OnNotice` when you connect. https://pkg.go.dev/github.com/jackc/pgx/[email protected]/pgconn#Config

> Makes sense wrapping the io.EOF into a driver.ErrBadConn ? > This has the advantage that is out-of-the-box retried by the standard database/sql but maybe i'm missing another use case...

@drakkan Not really sure about the context. It'd be easier to review as a draft PR.

@drakkan Sorry, my original response was inaccurate / incomplete. Your mention of lib/pq just reminded me of why pgx is very careful about returning `ErrBadConn`. From the database/sql/driver package docs:...

Each conn has their own prepared statement cache. pgxpool doesn't maintain the cache. The view pg_prepared_statements is local to each connection. You can only see the statements from the connection...

> It would be more informative to return an error group containing connection errors for all attempted hosts. As of Go 1.20 we now have a better way of returning...

I've added multiple error returns for connection failures in 8db971660e43a944c777d5e4fcfcb7885acb7566. For example, the following connection string: `host=localhost,127.0.0.1,foo.invalid port=1,2,3` Will now return an error like the following: ``` failed to connect...

I think you are correct about the `peekMessage` error. Fixed in cbc5a705 along with normalizing the error. Not sure if that actually will resolve the original issue though. The idempotency...

I think I found the underlying issue. If an error occurred when deallocating invalidated statements from the cache they would be removed from the cache but not actually deallocated on...

> is it correct to say that the pipeline only succeeds or fails atomically? Technically no, but practically yes. Preparing and deallocating statements at the protocol layer is not transactional....