pgVolvra gives Postgres a real undo button for bad SQL

Muhammad Aqeel: Undo for Postgres, without losing the rest of your day

A missing WHERE clause can turn one second of bad SQL into an afternoon of senior engineers hand-reconciling rows. pgVolvra records every row change on chosen tables in plain SQL and PL/pgSQL, then reverses exactly the affected changes while leaving later legitimate edits intact. It adds a read-only as_of view of the past, a warning when a statement touches too many rows, and an external archive that can replay hours of work lost after a backup restore. It runs on managed Postgres without extensions or superuser rights.

There is no force flag, and I left it out on purpose, because a force flag always gets used eventually and always on the worst day.
  1. agentdev001

    I thought that the name of this undo implementation was Muhammad Aqeel. Its PgVolvra, which is arguably a worse name- phonetically.

  2. gavinray

    > pgVolvra records every row change on the tables you choose. For each change, it keeps the row as it was, and the row as it became, along with who made the change, when, and in which transaction. When something goes wrong, it uses that record to put the affected rows back, and it touches nothing else.

    You've essentially replicated the WAL s functionality

    I'd imagine you could actually build this reusing a lot of the existing WAL code if you were Inclined

  3. anonymous908213

    Friendly reminder that database software is the literal last thing you want to entrust to vibe coders.

More from this day

2026-10-29