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

Re: Index build temp files

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Index build temp files
Date: 2013-01-08 22:21:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
* Bruce Momjian (bruce(at)momjian(dot)us) wrote:
> On Tue, Jan  8, 2013 at 05:09:47PM -0500, Stephen Frost wrote:
> > 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?
> Well, our docs for temp_tablespaces says:
>         This variable specifies tablespaces in which to create temporary
>         objects (temp tables and indexes on temp tables) when a
>         <command>CREATE</> command does not explicitly specify a tablespace.
>         Temporary files for purposes such as sorting large data sets
>         are also created in these tablespaces.
> Are you saying this is inaccorate?

Yes and no?  Are the temporary files created during a CREATE INDEX
considered "Temporary files for purposes such as sorting large data
sets"?  My thinking is 'yes', but others may disagree.  Also,
considering this a bug would imply that it's back-patchable and I'm not
convinced it's worth the risk of breaking things which depend on the
current behavior.



In response to


pgsql-hackers by date

Next:From: Robert HaasDate: 2013-01-08 22:23:36
Subject: Re: proposal: Set effective_cache_size to greater of .conf value, shared_buffers
Previous:From: Stephen FrostDate: 2013-01-08 22:17:41
Subject: Re: Re: Proposal: Store "timestamptz" of database creation on "pg_database"

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