{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreiasy7lylwcdcac7znw2e6wqwm5rg3sdn47tcnrxlq5m4mmvdm6swq",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mlrgm2bmi3x2"
  },
  "path": "/t/ann-hpgsql-a-pure-haskell-postgresql-driver-no-libpq/14101#post_5",
  "publishedAt": "2026-05-13T21:29:23.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "a github issue",
    "these TODOs",
    "stress tests"
  ],
  "textContent": "Thank you, Yuras! I think you were in fact the person that taught me a lot about asynchronous exceptions in a postgresql-simple PR review. I learned a lot then, so thanks!\n\n> I have a question about the semantics. Is it always safe to reuse connection unless I got `IrrecoverableHpgsqlError`? The docs are not 100% clear, e.g. this:\n\nOh, a different type of exception would be considered a bug in the library. I did try to wrap all potentially exception throwing code in a way that turns them into a `IrrecoverableHpgsqlError` precisely because otherwise it’s impossible to know what to do with the connection.\n\nSince it’s the first release, though, I wouldn’t be surprised if something escaped me. Still, take this as a project goal commitment.\n\n> And in `withTransactionMode` it looks like `IrrecoverableHpgsqlError` might get lost if async exception arrives between `tryAny` and `throw`\n\nI think I see what you’re saying. Very nice catch! I created a github issue for this, and will address it as soon as I can.\n\n> (Also these TODOs are suspicious)\n\nYes, there are a few warts I want to address in the codebase. This one is a potential problem “only” when opening new connections, so I thought I could do a first release before addressing them. I did take a lot more care once a connection is opened, and I have stress tests that have helped me catch and hone parts of the code.",
  "title": "[ANN] hpgsql, a pure Haskell PostgreSQL driver (no libpq)"
}