On 15 Apr 2015 19:12, "Tom Lane" <t...@sss.pgh.pa.us> wrote: > > I'm afraid this idea is a nonstarter, because it will break existing > applications, and in particular existing pg_dump output files, which > expect to be able to determine an index's tablespace by setting > "default_tablespace". (It is *not* adequate that the code falls back > to "default_tablespace" if the new GUC is unset; if it is set, you've > still broken pg_dump.) The incremental value, if indeed there is any, > of being able to control index positioning this way seems unlikely to > justify a backwards-compatibility break of such magnitude.
Just brainstorming here but that just means "default_tablespace" needs to take precedence. We could have a default_table_tablespace and default_index_tablespace which default_tablespace overrides. Or we could allow a mini config language in default_tablespace like "table=space1,index=space2".