"Ross J. Reedstrom" <[EMAIL PROTECTED]> writes: > ... So, all this append-only writing leads to files with lots of dead > tuples, so the vacuum command was added to reclaim space.
Actually, I believe the original Postgres design envisioned that no tuple would ever be permanently deleted: the idea was that you would always be able to query the database state as of past times as well as the present instant. Stonebraker intended to use the WORM drive as the repository for dead tuples that might be needed to answer such historical queries. The "vacuum cleaner" was originally a background process that pushed dead tuples from magnetic disk to WORM storage. Its current manifestation is dumbed-down from that, since we only delete rows and make no attempt to save them somewhere else --- but it was always an integral part of the system design. It's quite entertaining to read "The design of the POSTGRES storage system" (ERL-M87-06, available at http://db.cs.berkeley.edu//papers/) and compare it to where we are now. There is just enough similarity that it's obviously the ancestor of our present code ... but there is also a lot in that paper that has left *no* trace in our present code. I would love to know just how much of the paper actually got implemented and then discarded, and how much never got beyond the arm-waving stage. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly