是否可以访问 Postgres 中尚未清理的旧版本行?
如果在 Postgres 中修改了一行,但表尚未被清理,我假设该行的旧版本仍在表中。是否可以访问该行的版本?
If a row has been modified in Postgres but the table hasn't been vacuumed I'm assuming that the old version of the row is still in the table. Is it possible to access that version of the row?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这通常是不可能的,但由于删除行只不过是一个标志,因此您可以编写一个工具来恢复已删除的行。请注意,索引不会更新,之后必须重新创建。
我敢打赌 PostgreSQL IRC 频道上的人都有这样的工具,善意询问将是在这里相处的最快方式。
It is generally not possible, but since deletion of the row is not much more than a flag, you could write a tool that resurrects deleted rows. Beware that indexes and not updated and must be recreated afterwards.
I bet the people on the PostgreSQL IRC channel have tools like this, asking kindly will be the fastest way to get along here.
来自 postgres 否,但 grep 数据文件可能是。因为它是开源的,所以阅读它们应该不会太难。
顺便说一句,您应该首先关闭数据库以防止出现真空。
from postgres no, but greping the data files probably yes. since it's opensource shouldn't be too hard to read thems.
By the way you should first shutdown your database for preventing vacuum.