{"version":"2.1.274","anchor":"postgres-query-gains-an-explicit-statement-timeout-under-a-w","canonical_anchor":"postgres-query-gains-an-explicit-statement-timeout-under-a-w","heading":"Postgres query gains an explicit statement timeout under a wrapped transaction","tier":"internal","area":"Elsewhere","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274\/e\/postgres-query-gains-an-explicit-statement-timeout-under-a-w","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.274","markdown":"### Postgres query gains an explicit statement timeout under a wrapped transaction\n\nA Postgres query now runs with an explicit 2-second statement timeout inside a wrapped transaction\n\n**What**\n\nA rewritten internal database query helper now wraps its work in an explicit transaction: `BEGIN`, then `SET LOCAL statement_timeout = '2s'`, then `COMMIT`, run with `Promise.allSettled` and an abort check before it even starts. This replaces an older version that made a single call without this wrapping.\n\n**Why**\n\nThis puts a hard 2-second cap on how long this particular database query can run, preventing it from hanging indefinitely and holding up whatever depends on its result.\n\n- Area: Elsewhere\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}