Don't create indices on temp tables. It causes trouble when working across postgis versions, and isn't needed.