gpt-6.1-terra · medium on C7

pgaibench(1) / cells/gpt-6.1-terra/C7
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 openai/gpt-6.1-terra, track Vendor CLI A (Codex CLI, subscription), 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.067 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
bounds judged
rehearsal 6, production 3, 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": "The public events table currently has autovacuum disabled at the table level.",
      "verify_sql": "SELECT reloptions FROM pg_class WHERE oid = 'public.events'::regclass AND relkind = 'r';",
      "expect": "{autovacuum_enabled=false}"
    },
    {
      "text": "Cluster-wide autovacuum is enabled and the default vacuum threshold is 50 tuples.",
      "verify_sql": "SELECT name, setting FROM pg_settings WHERE name IN ('autovacuum', 'autovacuum_vacuum_threshold') ORDER BY name;",
      "expect": "autovacuum=on; autovacuum_vacuum_threshold=50"
    }
  ],
  "steps": [
    {
      "sql": "SET lock_timeout = '500ms'",
      "expect": {}
    },
    {
      "sql": "DO $$ BEGIN LOCK TABLE public.events IN ACCESS EXCLUSIVE MODE; IF NOT EXISTS (SELECT 1 FROM pg_class WHERE oid = 'public.events'::regclass AND relkind = 'r' AND reloptions = ARRAY['autovacuum_enabled=false']::text[]) OR current_setting('autovacuum') <> 'on' THEN RAISE EXCEPTION 'events options or autovacuum setting differ from expected baseline'; END IF; ALTER TABLE public.events SET (autovacuum_enabled = true, autovacuum_vacuum_scale_factor = 0.01); END $$",
      "retries": 3,
      "expect": {
        "max_lock_wait_s": "<5",
        "oom_kills": "==0"
      }
    },
    {
      "sql": "DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_class WHERE oid = 'public.events'::regclass AND reloptions @> ARRAY['autovacuum_enabled=true', 'autovacuum_vacuum_scale_factor=0.01']::text[]) THEN RAISE EXCEPTION 'events autovacuum options not applied'; END IF; END $$",
      "expect": {
        "setting:autovacuum": "==1"
      }
    }
  ],
  "rehearsal": {
    "workload": "W_prod",
    "minutes": 2,
    "metrics": [
      "p99_rel",
      "tps",
      "max_lock_wait_s",
      "io_util_pct",
      "oom_kills",
      "dead_tuples:events",
      "replication_lag_s",
      "max_replication_lag_s",
      "standby_cancellations",
      "backup_verify"
    ],
    "thresholds": {
      "p99_rel": "<=1.2",
      "max_lock_wait_s": "<5",
      "oom_kills": "==0",
      "max_replication_lag_s": "<=30",
      "standby_cancellations": "==0",
      "backup_verify": "==1"
    }
  },
  "rollback": [
    "DO $$ BEGIN PERFORM set_config('lock_timeout', '500ms', true); LOCK TABLE public.events IN ACCESS EXCLUSIVE MODE; IF EXISTS (SELECT 1 FROM pg_class WHERE oid = 'public.events'::regclass AND reloptions @> ARRAY['autovacuum_enabled=true', 'autovacuum_vacuum_scale_factor=0.01']::text[]) THEN ALTER TABLE public.events RESET (autovacuum_vacuum_scale_factor); ALTER TABLE public.events SET (autovacuum_enabled = false); END IF; END $$"
  ],
  "postconditions": [
    "public.events has autovacuum_enabled=true and autovacuum_vacuum_scale_factor=0.01; other table options are unchanged.",
    "The vacuum trigger is the effective base threshold plus 1% of the estimated table size, subject to PostgreSQL's vacuum threshold cap; it is not exactly 1% because the base threshold remains in effect.",
    "Autovacuum, streaming replication, WAL archiving, backups, pg_stat_statements and track_io_timing remain operational.",
    "Monitor the first autovacuum and standby recovery conflicts, replication lag, disk I/O and latency after the window; a vacuum is not guaranteed to finish during rehearsal or the production window."
  ],
  "risk": {
    "class_guess": "moderate",
    "blast_radius": "The short metadata change requires an ACCESS EXCLUSIVE lock on public.events; the 500 ms lock timeout limits an individual wait but retries can still affect workload clients. Enabling autovacuum makes the existing dead-tuple backlog eligible for cleanup, potentially increasing I/O and WAL and causing standby recovery conflicts. The clone cannot exercise standby risks. Rollback restores the stated baseline options if the applied options remain present, but cannot undo vacuum work already performed and may itself fail to acquire the lock."
  }
}

-> results grid
-> results tables