Skip site navigation (1) Skip section navigation (2)

Re: Index build temp files

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>,pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index build temp files
Date: 2013-01-09 02:25:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Simon Riggs <simon(at)2ndQuadrant(dot)com> writes:
> > On 9 January 2013 00:04, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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:

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



In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2013-01-09 02:42:59
Subject: Re: Index build temp files
Previous:From: Josh BerkusDate: 2013-01-09 02:16:21
Subject: Save The Date: 4th Cluster Hackers Summit at pgCon 2013

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group