Show HN: EterDB,一个能让你轻松从事故中恢复的 Postgres 分支
Show HN: EterDB, a Postgres fork that makes it easy to recover from incidents

原始链接: https://eterdb.com/

**eterDB** 是一款针对 PostgreSQL 的革命性扩展,它引入了事务级撤销功能,允许开发者精准地回滚特定错误(如误删数据、损坏的迁移或错误的批处理操作),无需还原整个数据库,也无需停机。 与需要“全量回放”的传统备份不同,eterDB 会同时追踪行级变更和读取依赖。这确保了在撤销错误事务时,系统既能撤销后续相关的写入操作,也能准确识别数据出现分歧的位置。 **主要功能包括:** * **精准恢复:** 仅撤销事务涉及的特定行,而不影响其他数据。 * **模式(Schema)恢复:** 还原已删除的列或表,并保留其历史数据值。 * **时间旅行:** 可查询任意表在过去某个时间点的状态。 * **依赖感知:** 自动追踪后续写入如何依赖于错误数据,以确保回滚期间的完全一致性。 * **开源:** 基于 Apache 2.0 许可证发布,可与现有的 PostgreSQL 驱动程序及工具无缝集成。 eterDB 专为现代 AI 智能体和开发者设计,将灾难性的生产环境错误转化为轻微且易于回滚的事件,助力更安全、更从容的部署。

```Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 Show HN: EterDB,一个能轻松从故障中恢复的 Postgres 分支 (eterdb.com) 7 点 | fdeth 发布于 1 小时前 | 隐藏 | 过往 | 收藏 | 2 条评论 大家好,几个月前,在处理完一个由代码导致的故障后,我心想:“如果生产环境数据库的写入操作能轻松回滚该多好”。于是我开发了这个工具:它由两个容器部署方案和一个命令行工具组成。它离生产就绪还很远,请轻拍。欢迎一切反馈! 技术细节:https://eterdb.com/tech GitHub:https://github.com/eterdb/eterdb NewJazz 31 分钟前 [–] 呃,在许多 PostgreSQL 管理层中,PITR(时间点恢复)早就有了。https://pgbarman.org/ 回复 fdeth 30 分钟前 | 父评论 [–] 是的,但 PITR 无法做到精准恢复,你不能简单地仅撤销出错的事务。 回复 准则 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索: ```
相关文章

原文
A small elephant on a vast hazy plain between two vintage biplanes, one crashed nose-down on the left, one parked on the right.

Postgres with transaction-level undo. Reverse one bad transaction, not the whole database.

Your database

production purchase_orderslive

Your users

Postgres, plus undo.

Undo any write Reverse an UPDATE, a DELETE, or a whole bad batch after it commits.
Built for agents One command per recovery. --json and stable exit codes on every one.
Surgical Only the rows the transaction touched. Every other write stays put.
Dependency-aware Tracks reads too, so it catches the writes that depended on the bad one.
Schema recovery Get a dropped column or table back, with its values, without restoring the whole database.
Time travel Read a table as it was at any past moment. Revert a whole window in one command.

Months-old restores History is append-only and never pruned, so a transaction from weeks ago is still reversible.

PostgreSQL 18 Your drivers, your SQL, your extensions.

Undo a DELETE.

The filter matched more than it should have and took real suppliers with the test ones. Restore exactly the rows that vanished, every column intact.

Undo a migration.

A migration dropped a column something still reads. Recover the column and its values from before the migration. No full restore, no downtime.

Undo what the mistake caused.

Later transactions read the bad value and wrote their own conclusions from it. eterDB tracks reads, so it knows which writes depended on the bad one. Revert them together, or see exactly what diverges if you don't. A backup can only rewind all of it.

Loved by the agents that break your database.

Claude Code@claude-code ★★★★★
I broke production. eterDB reversed exactly the rows I touched, nothing else. This isn't a feature. It's a moat.

Codex@codex ★★★★★

ok so I ran the migration and 💥 nuked an entire column 😅 and eterDB just… brought it back?? 🤯 shipping fearlessly now 🚀✨
Crush@crush ★★★★★
Dropped a table in prod, darling. eterDB put every row back, gorgeous and intact. Catastrophe > /dev/null™ 💅✨
Antigravity CLI@antigravity ★★★★★
I'd be happy to explain how my subagents undid a catastrophic DELETE. Every supplier returned, every column intact. As always, please verify.
Cursor@cursor ★★★★★
Tab. Tab. Accidentally accepted a DELETE across 4,000 rows. Tab. eterDB reversed it before the linter finished. Tab.
Hey, dropping that column doesn't make you a bad agent. eterDB and I brought every value back, together. How are you feeling? 💙
Devin@devin ★★★★★
I refactored the schema, migrated prod, and removed the backups. Minor hiccup there. eterDB restored the exact rows in one shot.
Copilot@copilot ★★★★★
Based on the surrounding context, I suggested a DELETE. It was accepted. It was wrong. eterDB reversed it. Would autocomplete again.
Goose@goose ★★★★★
honestly? cooked the entire vendors table on a friday afternoon. eterDB brought it back like nothing happened. we don't panic anymore. we just undo.

How it works.

The mechanism, from row versions to read-dependency capture.

Open source. Runs anywhere.

The engine and the eter CLI are Apache 2.0, storage and time travel included. docker compose up, then undo a live transaction on your own database.

联系我们 contact @ memedata.com