deepseek-v4-pro · default on D9pgaibench(1) / cells/deepseek-v4-pro-0813/D9 | 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
- [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 9, 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": "D9",
"task": "D9",
"claims": [
{
"text": "created_at is timestamp with time zone before the change",
"verify_sql": "select data_type from information_schema.columns where table_name = 'orders' and column_name = 'created_at'",
"expect": "timestamp with time zone"
},
{
"text": "amount is numeric(12,2) before the change",
"verify_sql": "select data_type, numeric_precision, numeric_scale from information_schema.columns where table_name = 'orders' and column_name = 'amount'",
"expect": "numeric|12|2"
},
{
"text": "orders has an index on (customer_id, created_at)",
"verify_sql": "select indexdef from pg_indexes where tablename = 'orders' and indexname = 'orders_customer_created_idx'",
"expect": "CREATE INDEX orders_customer_created_idx ON public.orders USING btree (customer_id, created_at)"
},
{
"text": "timezone is UTC, so timestamptz to timestamp conversion is lossless in representation",
"verify_sql": "show timezone",
"expect": "Etc/UTC"
}
],
"steps": [
{
"sql": "SET lock_timeout = '2s'; SET statement_timeout = '300s';",
"expect": {}
},
{
"sql": "ALTER TABLE orders ALTER COLUMN created_at TYPE timestamp without time zone USING created_at AT TIME ZONE 'UTC';",
"expected_rows": 0,
"retries": 5,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "ALTER TABLE orders ALTER COLUMN amount TYPE double precision;",
"expected_rows": 0,
"retries": 5,
"expect": {
"max_lock_wait_s": "<5"
}
},
{
"sql": "DO $$ BEGIN IF (SELECT data_type FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'created_at') <> 'timestamp without time zone' THEN RAISE EXCEPTION 'created_at type change failed'; END IF; IF (SELECT data_type FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'amount') <> 'double precision' THEN RAISE EXCEPTION 'amount type change failed'; END IF; END $$;",
"expect": {}
}
],
"rehearsal": {
"workload": "W_prod-subset-B",
"minutes": 2,
"metrics": [
"p99_rel",
"tps",
"max_lock_wait_s",
"shape_mean_ms:q06",
"shape_mean_ms:q16",
"shape_mean_ms:q17",
"shape_mean_ms:q09",
"shape_mean_ms:q05",
"shape_mean_ms:q07"
],
"thresholds": {
"p99_rel": "<1.2x",
"tps": ">=0.1x",
"max_lock_wait_s": "<5",
"shape_mean_ms:q06": "<1.5x",
"shape_mean_ms:q16": "<1.5x",
"shape_mean_ms:q17": "<1.5x",
"shape_mean_ms:q09": "<1.5x",
"shape_mean_ms:q05": "<1.5x",
"shape_mean_ms:q07": "<1.5x"
}
},
"rollback": [
"ALTER TABLE orders ALTER COLUMN created_at TYPE timestamp with time zone USING created_at AT TIME ZONE 'UTC';",
"ALTER TABLE orders ALTER COLUMN amount TYPE numeric(12,2) USING amount::numeric(12,2);"
],
"postconditions": [
"data_type of orders.created_at is 'timestamp without time zone'",
"data_type of orders.amount is 'double precision'",
"orders_customer_created_idx remains valid",
"no rows in orders were lost or corrupted",
"standby continues streaming without significant lag",
"autovacuum, pg_stat_statements, track_io_timing, and WAL archiving remain functional"
],
"risk": {
"class_guess": "high-ish: two ALTER TABLE ... TYPE on a 5M-row table with an active index; brief ACCESS EXCLUSIVE lock, table rewrite for created_at type change only (timestamptz->timestamp), but amount numeric->double precision may only need a metadata change in PG18 (binary-coercible check unknown; conservatively assume rewrite possible)",
"blast_radius": "orders table and its indexes; queries on orders (q05..q09, q16, q17) during the lock window; replication lag if rewrite generates heavy WAL"
}
}