Files
mtusi2026lab6/migrations/009_slo_commits.sql
T
2026-11-06 11:12:38 +03:00

12 lines
494 B
SQL

-- A separate immutable cohort: replay and job cleanup must not rewrite SLO history.
-- Existing jobs have no recoverable acceptance commit and are deliberately not backfilled.
CREATE TABLE attachment_slo (
attachment_id uuid PRIMARY KEY,
accepted_xid xid NOT NULL DEFAULT pg_current_xact_id()::xid,
ready_xid xid,
accepted_at timestamptz,
ready_at timestamptz,
bad boolean
);
CREATE INDEX attachment_slo_unresolved_idx ON attachment_slo(accepted_at) WHERE bad IS NULL;