Holger Marzen <holger@marzen.de> writes:
> in the German magazine "iX" from Feb 2004 I read an article about Open
> Source databases. The part about PostgreSQL wasn't bad but I am not sure
> if the author is right when he writes about crash revcovery. He writes
> that PostgreSQL has no UNDO function that resets unfinished transactions
> after a crash but only a REDO function that finishes completed
> transactions.
> I thought that PostgreSQL's crash recovery automatically rolls back
> everything that's not committed.
That is correct. It is also correct that we don't need an explicit UNDO
operation to make it happen --- the correct behavior falls out of MVCC
support automatically, and we leave it to a subsequent VACUUM to reclaim
any space that can be reclaimed.
If the author stated that the lack of UNDO caused us not to be
crash-correct, he's wrong, but he is correct that there's no UNDO code.
regards, tom lane