# pgVolvra gives Postgres a real undo button for bad SQL

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

> Hacker News story 50251085 · language: en · submitted 2026-10-26
> Web version: https://zeli.app/story/50251085
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 24 · by [hnisjafx40](<https://news.ycombinator.com/user?id=hnisjafx40>) · 💬 9
[original](<https://www.pgedge.com/blog/undo-for-postgres-without-losing-the-rest-of-your-day>) · [HN discussion](<https://news.ycombinator.com/item?id=50251085>)

## Summary

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.

## Key quote

> 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.

## HN discussion (9 comments)

### [agentdev001](<https://news.ycombinator.com/item?id=50287789>)

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

### [gavinray](<https://news.ycombinator.com/item?id=50288536>)

> \> 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

### [anonymous908213](<https://news.ycombinator.com/item?id=50287718>)

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

---

## Cite

- Page: https://zeli.app/story/50251085
- Date: 2026-10-26
- Source: pgedge.com (https://www.pgedge.com/blog/undo-for-postgres-without-losing-the-rest-of-your-day)
- Hacker News: https://news.ycombinator.com/item?id=50251085

## Other languages

- zh: https://zeli.app/zh/story/50251085 · markdown: https://zeli.app/zh/story/50251085.md
- ja: https://zeli.app/ja/story/50251085 · markdown: https://zeli.app/ja/story/50251085.md
- ko: https://zeli.app/ko/story/50251085 · markdown: https://zeli.app/ko/story/50251085.md
- de: https://zeli.app/de/story/50251085 · markdown: https://zeli.app/de/story/50251085.md
- es: https://zeli.app/es/story/50251085 · markdown: https://zeli.app/es/story/50251085.md
- ru: https://zeli.app/ru/story/50251085 · markdown: https://zeli.app/ru/story/50251085.md
