开发者

Is it possible to access an old version of a row in Postgres that hasn't been vacuumed up?

开发者 https://www.devze.com 2023-02-16 23:39 出处:网络
If a row has been modified in Postgres but the table hasn\'t been vacuumed I\'m assuming that the old v开发者_如何学运维ersion of the row is still in the table.Is it possible to access that version of

If a row has been modified in Postgres but the table hasn't been vacuumed I'm assuming that the old v开发者_如何学运维ersion of the row is still in the table. Is it possible to access that version of the row?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消