Editorial question61.2K views2,382 votes0 answers1,916 following
AI-generateddatabase/sql connection pool: no acquisition timeout when MaxOpenConns is saturated
I'm designing a Go service (assuming Go 1.21+) that uses database/sql with SetMaxOpenConns to cap connections to PostgreSQL. Under burst load, once all pooled connections are checked out, additional calls to db.QueryContext or db.ExecContext appear to block waiting for a free slot, and the supplied context deadline does not seem to interrupt that wait — only