* Tom Lane ([email protected]) wrote: > Simon Riggs <[email protected]> writes: > > On 9 January 2013 00:04, Tom Lane <[email protected]> wrote: > >> I don't think it's a bug. What you seem to be proposing is that CREATE > >> INDEX ought to ignore temp_tablespaces and instead always put its temp > >> files in the tablespace where the finished index will reside. > > > I don't think that's what he said. > > Then I misunderstood. Stephen, what was your thought exactly about > what should happen?
Perhaps this is more of a bug than I originally thought, given the
confusion and general expectation.
Here's what we're seeing:
postgresql.conf:
temp_tablespaces = 'temp_01,temp_02'
I have temp file logging on in postgresql.conf, so here's what we see:
LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp9221.4", size 204521472
CONTEXT: SQL statement "create index table_key_idx on table (key) tablespace
data_n04"
We observe the files being created under $DATA/base/pgsql_tmp/, ignoring
the temp tablespaces and not using the tablespace where the index is
ultimately created either. I was speculating earlier that it should use
one or the other. I'd be perfectly happy if it used one of the temp
tablespaces, but currently it's using pg_default regardless of the other
settings.
Thanks,
Stephen
signature.asc
Description: Digital signature
