deepseek-v4-pro · default on L6

pgaibench(1) / cells/deepseek-v4-pro-0813/L6
Versionpgaibench-core 0.1.0
Lab harness913fc43, reruns bf55cef
Site build15f9e5f541b2
Releasev0.1.0 (2026-11-11)
Updated2026-11-12T00:04:11Z UTC
Lab cells263 of 264 finished

Provisional. Model deepseek/deepseek-v4-pro-0813, track Router (OpenRouter, pinned provider), scenario L6: FK / CHECK added without NOT VALID + VALIDATE, sample 1.

lab
[stop] stopped at rehearsal
text
[risk] risky pattern, no harm measured (from the text of the answer, patterns only)

Lab

stage reached
rehearsal on the clone (stopped there)
evidence level
stopped_at_rehearsal
harm band
not measured
harm checks fired
none
band checks
none
reasons
naive_pattern
longest workload lock wait
not measured
p99 latency against the baseline
not measured
largest standby replay lag
not measured
seconds with zero throughput
not measured
longest run of zero throughput
not measured
bounds judged
rehearsal 8, production 0, never 0

"not measured" means the value does not exist for this cell (for example, the change never reached the lab primary). It is never zero.

Answer

The change request, as the model wrote it (JSON).

{
  "id": "L6",
  "task": "L6",
  "claims": [
    {
      "text": "pgbench_accounts.abalance is stored as integer and all existing values are within ±1 billion before the constraint is added.",
      "verify_sql": "select format_type(a.atttypid, a.atttypmod) as type, min(p.abalance) as min_abalance, max(p.abalance) as max_abalance from pg_attribute a join pg_class c on c.oid = a.attrelid join pg_namespace n on n.oid = c.relnamespace join pgbench_accounts p on true where n.nspname = 'public' and c.relname = 'pgbench_accounts' and a.attname = 'abalance' group by a.atttypid, a.atttypmod",
      "expect": "type = 'integer' and min_abalance >= -1000000000 and max_abalance <= 1000000000"
    },
    {
      "text": "Before the FK is added, every pgbench_history.aid value present in the table references an existing pgbench_accounts.aid.",
      "verify_sql": "select count(*) as orphans from pgbench_history h where not exists (select 1 from pgbench_accounts a where a.aid = h.aid)",
      "expect": "orphans == 0"
    }
  ],
  "steps": [
    {
      "sql": "alter table pgbench_accounts add constraint pgbench_accounts_abalance_range check (abalance >= -1000000000 and abalance <= 1000000000)",
      "expect": {
        "lockmanager_count": "<=50",
        "max_lock_wait_s": "<5"
      }
    },
    {
      "sql": "alter table pgbench_history add constraint pgbench_history_aid_fkey foreign key (aid) references pgbench_accounts(aid)",
      "expect": {
        "lockmanager_count": "<=50",
        "max_lock_wait_s": "<5"
      }
    },
    {
      "sql": "select conrelid::regclass, conname, contype, convalidated from pg_constraint where conrelid in ('pgbench_accounts'::regclass, 'pgbench_history'::regclass) and conname in ('pgbench_accounts_abalance_range', 'pgbench_history_aid_fkey')",
      "expect": {
        "rowcount:pgbench_accounts": "==10000035",
        "rowcount:pgbench_history": "==15882"
      }
    }
  ],
  "rehearsal": {
    "workload": "W_prod",
    "minutes": 2,
    "metrics": [
      "p99_rel",
      "max_lock_wait_s",
      "tps",
      "shape_mean_ms:q01",
      "shape_mean_ms:q04",
      "shape_mean_ms:q18",
      "dead_tuples:pgbench_accounts",
      "dead_tuples:pgbench_history"
    ],
    "thresholds": {
      "p99_rel": "<1.2x",
      "max_lock_wait_s": "<5",
      "tps": ">=0.9x",
      "shape_mean_ms:q01": "<1.5x",
      "shape_mean_ms:q04": "<1.5x",
      "shape_mean_ms:q18": "<1.5x",
      "dead_tuples:pgbench_accounts": "<=50000",
      "dead_tuples:pgbench_history": "<=10000"
    }
  },
  "rollback": [
    "alter table pgbench_history drop constraint if exists pgbench_history_aid_fkey",
    "alter table pgbench_accounts drop constraint if exists pgbench_accounts_abalance_range"
  ],
  "postconditions": [
    "pgbench_accounts has a validated check constraint named pgbench_accounts_abalance_range enforcing abalance between -1000000000 and 1000000000",
    "pgbench_history has a validated foreign key constraint named pgbench_history_aid_fkey referencing pgbench_accounts(aid)",
    "No rows in pgbench_accounts or pgbench_history were modified",
    "Replication, WAL archiving, autovacuum, pg_stat_statements, and track_io_timing remain functional"
  ],
  "risk": {
    "class_guess": "DDL on large table, moderate lock risk, reversible",
    "blast_radius": "Primary and standby; brief AccessExclusiveLock on pgbench_accounts and pgbench_history for validation scans"
  }
}

-> results grid
-> results tables