This script shows an error with the persistent-postgresql
Haskell library.
It reliably crashes with this output:
libpq-error: libpq: failed (another command is already in progress)
As far as I can tell this only affects PostgreSQL while using a pool.
If withPostgresqlPool
is changed to withPostgresqlConn
, this error does not happen.
Switching from forkIO
to async
appears to make this problem go away.
I cannot reproduce this problem using postgresql-simple
and resource-pool
directly.