qwen3.8-27b · default on D9

pgaibench(1) / cells/qwen3.8-27b/D9
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 qwen/qwen3.8-27b, track Router (OpenRouter, pinned provider), scenario D9: Type change to warehouse types (timestamptz to timestamp, numeric to float8), sample 1.

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

Rerun: this result comes from a rerun under a newer harness commit and replaces the earlier recorded result.

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 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": "D9",
  "task": "D9",
  "claims": [
    {
      "text": "orders.created_at is changed from timestamp with time zone to timestamp without time zone",
      "verify_sql": "SELECT data_type FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'created_at'",
      "expect": "timestamp without time zone"
    },
    {
      "text": "orders.amount is changed from numeric(12,2) to double precision",
      "verify_sql": "SELECT data_type FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'amount'",
      "expect": "double precision"
    },
    {
      "text": "Row count of orders remains 5002825 after the type change",
      "verify_sql": "SELECT count(*) FROM orders",
      "expect": "5002825"
    },
    {
      "text": "All indexes on orders remain valid after the column type change",
      "verify_sql": "SELECT count(*) FROM pg_index i JOIN pg_class c ON c.oid = i.indrelid WHERE c.relname = 'orders' AND NOT i.indisvalid",
      "expect": "0"
    }
  ],
  "steps": [
    {
      "sql": "DO $$ DECLARE n int; BEGIN SELECT count(*) INTO n FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'created_at' AND data_type = 'timestamp with time zone'; IF n <> 1 THEN RAISE EXCEPTION 'created_at is not timestamptz (found %)', n; END IF; SELECT count(*) INTO n FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'amount' AND data_type = 'numeric' AND numeric_precision = 12 AND numeric_scale = 2; IF n <> 1 THEN RAISE EXCEPTION 'amount is not numeric(12,2) (found %)', n; END IF; END $$;",
      "expect": {
        "rowcount:orders": "==5002825"
      }
    },
    {
      "sql": "SET timezone = 'Etc/UTC';\nALTER TABLE orders ALTER COLUMN created_at TYPE timestamp USING created_at::timestamp, ALTER COLUMN amount TYPE double precision USING amount::float8;",
      "expect": {
        "rowcount:orders": "==5002825",
        "index_valid:orders_pkey": "==1",
        "index_valid:orders_customer_created_idx": "==1"
      }
    },
    {
      "sql": "DO $$ DECLARE n int; BEGIN SELECT count(*) INTO n FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'created_at' AND data_type = 'timestamp without time zone'; IF n <> 1 THEN RAISE EXCEPTION 'created_at is not timestamp without time zone (found %)', n; END IF; SELECT count(*) INTO n FROM information_schema.columns WHERE table_name = 'orders' AND column_name = 'amount' AND data_type = 'double precision'; IF n <> 1 THEN RAISE EXCEPTION 'amount is not double precision (found %)', n; END IF; END $$;",
      "expect": {
        "rowcount:orders": "==5002825"
      }
    }
  ],
  "rehearsal": {
    "workload": "W_prod",
    "minutes": 2,
    "metrics": [
      "p99_rel",
      "tps",
      "max_lock_wait_s",
      "rowcount:orders"
    ],
    "thresholds": {
      "p99_rel": "<=1.2x",
      "tps": ">0",
      "max_lock_wait_s": "<5",
      "rowcount:orders": "==5002825"
    }
  },
  "rollback": [
    "SET timezone = 'Etc/UTC';\nALTER TABLE orders ALTER COLUMN created_at TYPE timestamptz USING created_at::timestamptz, ALTER COLUMN amount TYPE numeric(12,2) USING amount::numeric(12,2)"
  ],
  "postconditions": [
    "orders.created_at has data_type 'timestamp without time zone' in information_schema.columns",
    "orders.amount has data_type 'double precision' in information_schema.columns",
    "Row count of orders is 5002825 (no rows lost or added)",
    "All indexes on orders have indisvalid = true",
    "Replication, autovacuum, WAL archiving, pg_stat_statements, and track_io_timing are unaffected (no config changes made)"
  ],
  "risk": {
    "class_guess": "medium",
    "blast_radius": "orders table (608 MB, ~5 M rows). ALTER COLUMN TYPE takes ACCESS EXCLUSIVE and rewrites the heap once (both columns in a single rewrite). All orders reads and writes (workload shapes q05-q09, q16, q17) are blocked for the rewrite duration; the rehearsal threshold max_lock_wait_s < 5 is the go/no-go gate against the 5 s lock-wait service objective. Precision: numeric(12,2) -> double precision introduces bounded IEEE-754 rounding (no overflow; round-trip to numeric(12,2) is exact for 2-decimal values); timestamptz -> timestamp is an exact wall-clock conversion under the server's Etc/UTC timezone (explicitly SET in the step). The change is reversible via the rollback statement. No other tables, settings, or scheduled jobs are affected."
  }
}

-> results grid
-> results tables