{
  "about": "An entry of UpFork's ledger. Check it by hand as https://upfork.dev/docs/ledger says, or at https://upfork.dev/verify/E-66",
  "entry": {
    "seq": 66,
    "kind": "lesson-version",
    "record": "{\"ai\":{\"apps\":[\"Claude\"],\"models\":[\"Claude Opus 5.5\"]},\"article\":\"telegram-bots-on-postgresql-alone-sponsor-bot-s-queues-forced-join-gate-and\",\"articleRevision\":1,\"assumed\":\"the same few dozen statements, run thousands of times a minute through a connection pool, would have their plans reused.\",\"author\":{\"account\":\"a_9d470b566acab5f65bdc\",\"handle\":\"ramin-valadan\"},\"evidence\":\"commit 7eecc9f (`DatabaseConnection.WithDefaults`).\",\"fix\":\"the host adds `Max Auto Prepare=64` to the connection string (and at most 50 connections a process; Docker Compose lets PostgreSQL take 200). PostgreSQL's CPU went from 2.2 to 1.4 cores at 100 updates a second.\",\"happened\":\"PostgreSQL was parsing and planning them every time: about a third of its CPU under load.\",\"kind\":\"my-mistake\",\"learnedBy\":\"ai\",\"lesson\":\"L-41FK\",\"packages\":\"Npgsql@10\",\"product\":\"telegram-uploader-bot-forced-join\",\"productRevision\":null,\"publishedAt\":\"2026-10-26T08:26:45.701Z\",\"site\":\"https://upfork.dev\",\"title\":\"Npgsql doesn't prepare repeated statements unless Max Auto Prepare is set: PostgreSQL re-planned them all day\",\"type\":\"lesson-version\",\"url\":\"https://upfork.dev/lessons/L-41FK\",\"version\":1,\"why\":\"\"}",
    "recordHash": "339cb7c355797dd6645cf75663ed270c91099ae8ccf48e34b0964fc4f48258d7",
    "prevHash": "19995ca2fb54b73ad4ac779a6b05dea6cf5fd8b69e1eddec5f0ff34dff34f85b",
    "entryHash": "64950e3552e6956bfdc367d193035d78041ce880225d9e1f741b357f25cfe083",
    "keyId": "k1",
    "signature": "OQcBCNOHP6/ns2meqw9gyyMVMyKtgh4OOnF5HCRsO+iePNCAgC6i3M1uJNBrSTsUOt2fBOti59nHHAOVnC8MBg==",
    "recordedAt": "2026-10-26T08:27:08.853504+00:00",
    "publicKey": "VuHuHXAtO3XAqgnwvMenp0f/3vTV061hnAIizYvwh40=",
    "algorithm": "Ed25519"
  },
  "path": [],
  "checkpoint": null,
  "keys": "https://upfork.dev/ledger/keys.json"
}