nikita-volkov / hasql-pool

A pool of connections for Hasql
http://hackage.haskell.org/package/hasql-pool
MIT License
17 stars 15 forks source link

Acquisition timeout #19

Closed robx closed 2 years ago

robx commented 2 years ago

This introduces an acquisition timeout, making it possible to bail out of waiting for a connection cleanly. (Includes the changes from #16 to avoid dealing with conflicts, happy to rebase with only this change though if preferred.)

We want something like this for PostgREST (https://github.com/PostgREST/postgrest/issues/2348) to be able to actively time out queries that are blocked waiting for an overloaded connection pool.

robx commented 2 years ago

The actual change is the last commit only: https://github.com/nikita-volkov/hasql-pool/pull/19/commits/946358eebac009b9332ca369d2a9da82937712b0