Attached is a patch implementing this functionality. I've modified make_new_heap() as well as swap_relfilenodes() to not assume that tablespaces remain the same from old to new heap. I thought it better to go down this road than introduce a lot of duplicate code.
Thanks Gavin
altertable.diff.gz
Description: GNU Zip compressed data
---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster