Josh Berkus <josh@agliodbs.com> writes:
> While I'm writing this guide ... where does PostgreSQL store temp files for
> queires which are too large for sort_mem?
Each database has a temp directory. I think it's called
$PGDATA/base/DBOID/pgsql_tmp. You can replace that subdirectory by a
symlink if you want to put temp files someplace else.
regards, tom lane