AIToday
Large Language ModelsAI Coding AssistantsAI Business & IndustryZenn AI/MLPublished: Dec 5, 2026, 10:01 JST

AI runs night DB repair: VACUUM FULL cuts 46.76GiB to 19.90GiB

Send on LINE
AI runs night DB repair: VACUUM FULL cuts 46.76GiB to 19.90GiB

3 Key Points

  1. What happened

    The Polestar server's operator had Codex and GPT-6.1-Sol repair a corrupted PGroonga index after a mistaken Cluster deletion; the AI skipped the planned REINDEX, ran VACUUM FULL on the note table instead, and shrank the DB from 46.76GiB to 19.90GiB.

  2. Why it matters

    The pre-written decision branch was followed exactly, suggesting an AI can pick the safer of two repair paths without a human watching overnight.

Ask AI

Ask the AI about this article. Questions and answers are published on this page

Context & Analysis

The maintenance was triggered by a human error: the operator deleted the CloudNativePG Cluster resource, wiping the Misskey database. Because the manifests live in GitHub, restoring was straightforward, but a rare note-posting failure appeared afterward and the cause was unclear. The AI traced the error logs to a corrupted PGroonga index on the note table's text column, matched the file name to the table via PostgreSQL's relfilenode, and confirmed there was about 98GiB of free volume space, ruling out a capacity problem.

The runbook itself was drafted by GPT-6.1-Sol and reviewed by GPT-6-Astra, with a human review pass. That review changed the plan: a proposed backup method that would stop writes every day was rejected, the repair and WAL migration steps were merged into a single downtime window, and the backup was moved before the stop so no writes would be lost. VACUUM FULL was made conditional on first measuring free space, with a branch choosing between REINDEX and VACUUM FULL on note.

During the night the AI handled several unplanned issues on its own, including a Flux Operator that undid a paused Kustomization, a read-only /tmp on the database pod, a timed-out log transfer, and a dropped backup tool connection that it did not re-run. The reported downtime was about 1 hour 17 minutes, of which 50 minutes was a physical backup.

FAQ
Why was REINDEX skipped?
Measuring the note table showed 72.69% of its roughly 13GB file was free space, so VACUUM FULL was chosen and rebuilt the index as part of the same operation.
Did the note count change after the maintenance?
No. The note table held 8,415,537 rows both before and after the work; the space came from reclaiming free space, rebuilding indexes, and cleaning old PGroonga internal data.
What safeguards were given to the AI?
Instructions barred deleting original data or existing backups, clearing Valkey job queues, test-posting to production, and immediately re-running an interrupted long operation.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

By signing up you agree to the Terms of Service and Privacy Policy.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Related Articles

Next articleTSMC breaks ground in Arizona; Trump touts AI chip output