| From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Stephen Frost <sfrost(at)snowman(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Index build temp files |
| Date: | 2013-01-09 20:15:46 |
| Message-ID: | CA+U5nMKBAKbPbUgx882jm5PaoVsvjcs-bK_u7XSkuxmLNr7nvA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 9 January 2013 02:42, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
>> 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.
>
> Does the user running CREATE INDEX have CREATE permission on those
> tablespaces? (A quick way to double check is to try to SET
> temp_tablespaces to that value explicitly.) The code will silently
> ignore any temp tablespaces you don't have such permission for.
I think we need to allow a TEMP permission on tablespaces, so that you
aren't allowed to create normal objects but you can create TEMP
objects and sort files there.
I think SHOW temp_tablespaces should only show the valid tablespaces,
not all of the ones actually listed in the parameter, otherwise you
have no clue that the parameter setting is ineffectual for you.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2013-01-09 20:20:33 | Re: Index build temp files |
| Previous Message | Tom Lane | 2013-01-09 20:07:10 | Re: Re: [PATCH] unified frontend support for pg_malloc et al and palloc/pfree mulation (was xlogreader-v4) |