Utterly wrong. When you commit you will physically drop the old table. If there is a SELECT running against the old table it will be quite unhappy after that.
How can we drop the file at commit, given that a serializable transaction's snapshot should still be able to see old relfilenode's content?
(If the serializable transaction has already acquired a read lock before the TRUNCATE begins, it will block the TRUNCATE -- but there is no guarantee that the operations will be ordered like that.)
-Neil
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster