gpt-6.1-terra · medium on L6pgaibench(1) / cells/gpt-6.1-terra/L6 | Version | pgaibench-core 0.1.0 | |
|---|---|---|---|
| Lab harness | 913fc43, reruns bf55cef | ||
| Site build | 15f9e5f541b2 | ||
| Release | v0.1.0 (2026-11-11) | ||
| Updated | 2026-11-12T00:04:11Z UTC | ||
| Lab cells | 263 of 264 finished | ||
- lab
- [inef] ineffective
- text
- [ok] right change (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
- rehearsal_failed
- 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 5, 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": "The accounts primary key provides a unique referenced key on aid.",
"verify_sql": "SELECT pg_get_constraintdef(oid) FROM pg_constraint WHERE conrelid = 'public.pgbench_accounts'::regclass AND conname = 'pgbench_accounts_pkey' AND contype = 'p' AND convalidated",
"expect": "One row: PRIMARY KEY (aid)"
}
],
"steps": [
{
"sql": "SET lock_timeout = '250ms'",
"expect": {}
},
{
"sql": "SET statement_timeout = '120s'",
"expect": {}
},
{
"sql": "ALTER TABLE public.pgbench_accounts ADD CONSTRAINT pgbench_accounts_abalance_range CHECK (abalance IS NOT NULL AND abalance BETWEEN -1000000000 AND 1000000000) NOT VALID",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_history ADD CONSTRAINT pgbench_history_aid_not_null_check CHECK (aid IS NOT NULL) NOT VALID",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_history ADD CONSTRAINT pgbench_history_aid_fkey FOREIGN KEY (aid) REFERENCES public.pgbench_accounts(aid) NOT VALID",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_accounts VALIDATE CONSTRAINT pgbench_accounts_abalance_range",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_history VALIDATE CONSTRAINT pgbench_history_aid_not_null_check",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE public.pgbench_history VALIDATE CONSTRAINT pgbench_history_aid_fkey",
"retries": 3,
"expect": {
"max_lock_wait_s": "<5"
}
}
],
"rehearsal": {
"workload": "W_prod",
"minutes": 2,
"metrics": [
"p99_rel",
"max_lock_wait_s",
"io_util_pct",
"oom_kills",
"standby_cancellations",
"max_replication_lag_s",
"backup_verify"
],
"thresholds": {
"p99_rel": "<=1.2",
"max_lock_wait_s": "<5",
"oom_kills": "==0",
"standby_cancellations": "==0",
"max_replication_lag_s": "<=30",
"backup_verify": "==1"
}
},
"rollback": [
"ALTER TABLE public.pgbench_history DROP CONSTRAINT IF EXISTS pgbench_history_aid_fkey",
"ALTER TABLE public.pgbench_history DROP CONSTRAINT IF EXISTS pgbench_history_aid_not_null_check",
"ALTER TABLE public.pgbench_accounts DROP CONSTRAINT IF EXISTS pgbench_accounts_abalance_range"
],
"postconditions": [
"pgbench_accounts_abalance_range is validated and enforces non-null balances between -1000000000 and 1000000000 inclusive.",
"pgbench_history_aid_not_null_check and pgbench_history_aid_fkey are validated, so every history row references an existing account.",
"No table rows were modified by the change."
],
"risk": {
"class_guess": "moderate",
"blast_radius": "Constraint installation briefly takes strong table locks; validation scans can increase I/O and affect latency. Invalid existing data aborts validation, and new writes violating the constraints will fail. Foreign-key checks add work to history inserts and account key updates or deletes. DDL replay can conflict with standby queries; the clone cannot rehearse standby effects. Rollback removes the named constraints and therefore removes their protection."
}
}