Index build temp files

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: pgsql-hackers@postgresql.org
Date: 2013-01-08T22:09:47Z
Lists: pgsql-hackers
Greetings,

  We were surprised recently to note that the temp files that are
  created during a CREATE INDEX don't go into either a temp tablespace
  set for the user or into the tablespace which the CREATE INDEX
  specifies.  Instead, they go only into base/pgsql_tmp/.  This doesn't
  allow for any flexibility in defining where to create these
  potentially quite large sets of files.

  Shouldn't these temp files be going into the temp tablespace for the
  user creating the index instead..?  Or perhaps into the tablespace
  which the index is being created in?

  	Thanks,

		Stephen