Re: Tablespace for temporary objects and sort files - Mailing list pgsql-patches

From Jaime Casanova
Subject Re: Tablespace for temporary objects and sort files
Date
Msg-id c2d9e70e0610250407y1a7d10cdmde17d74e9d491c31@mail.gmail.com
Whole thread Raw
In response to Tablespace for temporary objects and sort files  (Albert Cervera Areny <albertca@hotpop.com>)
Responses Re: Tablespace for temporary objects and sort files
List pgsql-patches
On 10/24/06, Albert Cervera Areny <albertca@hotpop.com> wrote:
> Hi,
>
> I'm trying to introduce myself into postgresql development and I'm working on
> the "tablespace for temporary objects and sort files" TODO item.

some comments from a non-hacker:

your patch isn't doing nothing at all for temporary indexes... a quick
search for GetDefaultTablespace() shows this places...

postgres@casanova:~/PG_RELEASES/pgsql$ grep -lR GetDefaultTablespace *
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/backend/commands/tablespace.c
src/backend/executor/execMain.c
src/include/commands/tablespace.h


Now a question, why not using the same GetDefaultTablespace() with an
argument indicating if the object is temporary, if it is get the
default tablespace for temp objects else get the default tablespace
for permanent object... just an idea...

>         How can I test that the tablespace is correctly used for sort files? Is there
> an easy way? Or should I reduce work_mem to a minimum, populate the database
> with data and try an "ORDER BY"?
>

yes, that seems to work... i reduce, just in case, work_mem,
shared_buffers and temp_buffers...

Now, PG_TEMP_FILES_DIR seems to add just pgsql_temp to the filename. i
think you the function you have to modify here is
make_database_relative() that adds base/#database_oid# at the
beginning of the path of the file.

>
> Hope the diff and idents are ok. Please let me know if there's something wrong
> with them.
>

diff -c is the way

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Tablespace for temporary objects and sort files
Next
From: Albert Cervera Areny
Date:
Subject: Re: Tablespace for temporary objects and sort files