hasql-pool keeps the results of failed connection attempts in the pool, and offers them to subsequent queries. In consequence, transient connection failures at program start poison the pool, and all future attempts at running SQL fail.
If I understand correctly, resource-pool expects create to return a valid resource or throw an exception. If create or subsequent actions using the resource throw an exception, resource-pool removes the resource from the pool, making room for a new connection.
hasql-pool encodes connection failures as Left, which remain in the pool, and are never replaced by actual connections.
hasql-pool
keeps the results of failed connection attempts in the pool, and offers them to subsequent queries. In consequence, transient connection failures at program start poison the pool, and all future attempts at running SQL fail.If I understand correctly, resource-pool expects
create
to return a valid resource or throw an exception. Ifcreate
or subsequent actions using the resource throw an exception,resource-pool
removes the resource from the pool, making room for a new connection.hasql-pool
encodes connection failures asLeft
, which remain in the pool, and are never replaced by actual connections.