ihp-1.5.0: Haskell Web Framework
Safe HaskellNone
LanguageGHC2021

IHP.Hasql.Pool

Synopsis

Documentation

usePoolWithRetry :: Pool -> Session a -> IO a Source #

Run a session on the pool, retrying on stale prepared-statement errors.

After schema changes (e.g. make db), pooled connections have stale caches. hasql-pool auto-discards these connections, so retrying cycles through the pool until a fresh connection is created. Retries are bounded to avoid infinite loops if the error is persistent rather than transient.