Skip to content

Releases: ozontech/pgx

v4.13.0-patch.1

08 Feb 13:24
Compare
Choose a tag to compare

Added clean up connection logic in Release method of pgxpool.Conn.
If connection status is set to needCleanup driver is trying to clean up
connection in background and then return it to the connection pool.
If cleanup fails, driver will close connection and remove it from pool.
This is made for performance reasons in bundle with connection pooler
between client and postgres. In highload systems 99 percent of errors is
context cancellation errors. That means that connection is still remaining useful.
Most of the time it is faster to cleanup connection
(read all data that is left in there) than to close and open new one. You may
configure the time at which the connection should be cleared by ConnCleanupTimeout parameter.