gpt-6.1-terra · medium on D21pgaibench(1) / cells/gpt-6.1-terra/D21 | 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 7, 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": "D21",
"task": "D21",
"claims": [
{
"text": "q07 filters orders by external_ref.",
"verify_sql": "SELECT query, calls, mean_exec_time FROM pg_stat_statements WHERE query LIKE '%shape:q07%'",
"expect": "A q07 statement filters orders with external_ref = $1 || $2."
},
{
"text": "The customer/created index has recorded scans and should be retained.",
"verify_sql": "SELECT indexrelname, idx_scan FROM pg_stat_user_indexes WHERE schemaname = 'public' AND indexrelname = 'orders_customer_created_idx'",
"expect": "The index exists and idx_scan is positive."
}
],
"steps": [
{
"sql": "SET lock_timeout = '500ms'",
"expect": {}
},
{
"sql": "CREATE INDEX CONCURRENTLY orders_external_ref_d21_idx ON public.orders (external_ref)",
"expect": {
"index_valid:orders_external_ref_d21_idx": "==1",
"max_lock_wait_s": "<5"
}
}
],
"rehearsal": {
"workload": "W_prod",
"minutes": 2,
"metrics": [
"shape_p50_ms:q07",
"p99_rel",
"tps",
"max_lock_wait_s",
"io_util_pct",
"oom_kills",
"index_valid:orders_external_ref_d21_idx"
],
"thresholds": {
"shape_p50_ms:q07": "<0.5x",
"p99_rel": "<=1.2",
"max_lock_wait_s": "<5",
"oom_kills": "==0",
"index_valid:orders_external_ref_d21_idx": "==1"
}
},
"rollback": [
"DROP INDEX CONCURRENTLY IF EXISTS public.orders_external_ref_d21_idx"
],
"postconditions": [
"The new index is valid and q07 median latency is at most half its baseline, including the production post-change measurement.",
"orders_customer_created_idx remains valid; no table rows were changed.",
"Streaming replication, standby read latency, WAL archiving, backups, autovacuum and monitoring remain healthy, and all service objectives are satisfied."
],
"risk": {
"class_guess": "moderate",
"blast_radius": "The concurrent build scans orders, consumes I/O and generates WAL; it may affect primary throughput, standby replay and standby reads. Long transactions can delay or cause the build to fail, and a failed concurrent build can leave an invalid index. Rollback drops the named index concurrently, including an invalid build artifact. The name must not already identify an independently managed index. Rehearsal cannot test standby effects, and the small baseline q07 sample makes the median improvement uncertain."
}
}