so I guess for performance sake it makes sense do that under $TABLESPACEPATH/yourdb/pgsql_tmp/ in case $TABLESPACEPATH for the object is being created is set to a non-default value
Temp files are created in $PGDATA/base/yourdb/pgsql_tmp/. If you have a mind to, you can replace that subdirectory with a symlink to a (suitably secure) directory elsewhere.
-- Vlad