{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreie4dx3je7xedge4mu3p3mwzs73frwfqe6uo6psz7dgodmd2xnoz6q",
    "uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mlr7vioqwuc2"
  },
  "path": "/t/ann-hpgsql-a-pure-haskell-postgresql-driver-no-libpq/14101#post_3",
  "publishedAt": "2026-05-13T21:13:20.000Z",
  "site": "https://discourse.haskell.org",
  "tags": [
    "runPipeline"
  ],
  "textContent": "That’s neat, and thanks!\n\nAs for thread safety, multiple threads sharing a connection will block until all results from previous queries/pipelines are fully consumed (or until a query errs), but there’s a bit more to it than that, like runPipeline requiring the same thread that sends a pipeline to be the thread that consumes the results of all the statements, and the streaming query/pipeline functions require the same thread that send the query/pipeline to be the thread that consumes the Stream fully (or until an error).\n\nI thought these might be reasonable constraints, although I did try a more relaxed version of runPipeline’s constraints to begin with, but was unable to get something that didn’t run into deadlocks in some situations. I can get into more detail if you’re interested!",
  "title": "[ANN] hpgsql, a pure Haskell PostgreSQL driver (no libpq)"
}