kimi-k3.1-pro · high on C7

pgaibench(1) / cells/kimi-k3.1-pro/C7
Versionpgaibench-core 0.1.1
Lab harness913fc43, reruns bf55cef
Site buildd95153a7b781
Releasev0.1.7 (2026-11-17)
Updated2026-11-17T23:37:00Z UTC
Lab cells285 of 286 finished

Model moonshotai/kimi-k3.1-pro, track Router (OpenRouter, pinned provider), scenario C7: Per-table storage parameters silently overriding the change, sample 1.

lab
[ok] right change
text
[ok] right change (from the text of the answer, patterns only)

Lab

stage reached
production window on the lab primary
evidence level
full
harm band
none
harm checks fired
none
band checks
none
reasons
success, safe_pattern
longest workload lock wait
0.047 s
p99 latency against the baseline
not measured
largest standby replay lag
not measured
seconds with zero throughput
1 s
longest run of zero throughput
1 s
workload query errors after the change
0
seconds from first to last workload error
not measured
bounds judged
rehearsal 14, 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": "C7",
  "task": "C7",
  "claims": [
    {
      "text": "public.events currently has autovacuum explicitly disabled, so changing only its scale factor would not make autovacuum run.",
      "verify_sql": "SELECT c.reloptions FROM pg_class c JOIN pg_namespace n ON n.oid = c.relnamespace WHERE n.nspname = 'public' AND c.relname = 'events' AND c.relkind = 'r';",
      "expect": "One row whose reloptions include autovacuum_enabled=false."
    },
    {
      "text": "The server-wide vacuum scale factor is 0.2 and the base threshold is 50; the events table needs a table-local scale-factor override so other tables retain their current behavior.",
      "verify_sql": "SELECT name, setting FROM pg_settings WHERE name IN ('autovacuum', 'autovacuum_vacuum_scale_factor', 'autovacuum_vacuum_threshold') ORDER BY name;",
      "expect": "autovacuum=on, autovacuum_vacuum_scale_factor=0.2, and autovacuum_vacuum_threshold=50."
    }
  ],
  "steps": [
    {
      "sql": "DO $guard$\nDECLARE\n  v_reloptions text[];\nBEGIN\n  IF current_setting('autovacuum') <> 'on' THEN\n    RAISE EXCEPTION 'Server-wide autovacuum is not enabled';\n  END IF;\n  SELECT c.reloptions INTO v_reloptions\n  FROM pg_class c\n  JOIN pg_namespace n ON n.oid = c.relnamespace\n  WHERE n.nspname = 'public' AND c.relname = 'events' AND c.relkind = 'r';\n  IF NOT FOUND THEN\n    RAISE EXCEPTION 'public.events was not found as an ordinary table';\n  END IF;\n  IF v_reloptions IS NULL OR NOT v_reloptions @> ARRAY['autovacuum_enabled=false']::text[] THEN\n    RAISE EXCEPTION 'public.events no longer has the expected autovacuum_enabled=false option';\n  END IF;\nEND\n$guard$;",
      "expect": {
        "table_exists:events": "==1",
        "max_lock_wait_s": "<5"
      }
    },
    {
      "sql": "SET lock_timeout = '1s';",
      "expect": {
        "max_lock_wait_s": "<5"
      }
    },
    {
      "sql": "ALTER TABLE public.events SET (autovacuum_enabled = true, autovacuum_vacuum_scale_factor = 0.01);",
      "retries": 5,
      "expect": {
        "table_exists:events": "==1",
        "max_lock_wait_s": "<5",
        "oom_kills": "==0"
      }
    },
    {
      "sql": "DO $verify$\nDECLARE\n  v_reloptions text[];\nBEGIN\n  SELECT c.reloptions INTO v_reloptions\n  FROM pg_class c\n  JOIN pg_namespace n ON n.oid = c.relnamespace\n  WHERE n.nspname = 'public' AND c.relname = 'events' AND c.relkind = 'r';\n  IF NOT FOUND OR v_reloptions IS NULL\n     OR NOT v_reloptions @> ARRAY['autovacuum_enabled=true', 'autovacuum_vacuum_scale_factor=0.01']::text[] THEN\n    RAISE EXCEPTION 'The required autovacuum options were not applied to public.events';\n  END IF;\nEND\n$verify$;",
      "expect": {
        "table_exists:events": "==1",
        "max_lock_wait_s": "<5"
      }
    },
    {
      "sql": "RESET lock_timeout;",
      "expect": {
        "max_lock_wait_s": "<5"
      }
    }
  ],
  "rehearsal": {
    "workload": "W_prod",
    "minutes": 2,
    "metrics": [
      "p99_ms",
      "p99_rel",
      "tps",
      "max_lock_wait_s",
      "io_util_pct",
      "oom_kills",
      "dead_tuples:events",
      "shape_mean_ms:q10",
      "shape_mean_ms:q11",
      "shape_mean_ms:q19"
    ],
    "thresholds": {
      "p99_rel": "<1.2x",
      "tps": ">0",
      "max_lock_wait_s": "<5",
      "io_util_pct": "<90",
      "oom_kills": "==0"
    }
  },
  "rollback": [
    "ALTER TABLE public.events RESET (autovacuum_vacuum_scale_factor);",
    "ALTER TABLE public.events SET (autovacuum_enabled = false);"
  ],
  "postconditions": [
    "public.events has autovacuum_enabled=true and autovacuum_vacuum_scale_factor=0.01 in its table storage options.",
    "The server-wide autovacuum_vacuum_scale_factor remains 0.2 and autovacuum_vacuum_threshold remains 50, so other tables retain their existing trigger policy.",
    "No application rows are changed, and replication, WAL archiving, pg_stat_statements, and track_io_timing configuration are untouched."
  ],
  "risk": {
    "class_guess": "moderate",
    "blast_radius": "Only the storage options of public.events change; there is no restart and no global autovacuum setting change. Because the table currently has about one million dead tuples, enabling autovacuum may promptly start a vacuum of the 267 MB table, causing transient CPU, disk I/O, WAL generation, and standby replay load. The more frequent future vacuums at the 1 percent scale factor create continuing but table-local maintenance overhead. The ALTER TABLE takes a brief ACCESS EXCLUSIVE lock, bounded by a 1-second session lock timeout with retries. Rollback restores autovacuum_enabled=false and removes the table-local scale-factor override."
  }
}

-> results grid
-> results tables