pgsql_tmp and external sort

Started by Soroosh Sardariover 12 years ago3 messages
#1Soroosh Sardari
soroosh.sardari@gmail.com

Dear Hackers

Recently I find about pgsql_tmp directory. As I think, this directory is a
area for making temporal files which are used for external sort.

I wonder if anyone could help me to find the module of pg that is
responsible for the temporal space and external sort in the PG source code.

Regards
Soroosh Sardari

#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: Soroosh Sardari (#1)
Re: pgsql_tmp and external sort

On 02.07.2013 10:55, Soroosh Sardari wrote:

Dear Hackers

Recently I find about pgsql_tmp directory. As I think, this directory is a
area for making temporal files which are used for external sort.

I wonder if anyone could help me to find the module of pg that is
responsible for the temporal space and external sort in the PG source code.

See src/backend/utils/sort/tuplesort.c and
src/backend/storage/file/buffile.c for starters.

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3MauMau
maumau307@gmail.com
In reply to: Soroosh Sardari (#1)
Re: pgsql_tmp and external sort

From: "Soroosh Sardari" <soroosh.sardari@gmail.com>

I wonder if anyone could help me to find the module of pg that is
responsible for the temporal space and external sort in the PG source
code.

See src/backend/utils/sort/ for sort implementation.
That uses BufFile in src/backend/storage/file/buffile.c,
which in turn uses OpenTemporaryFile in src/backend/storage/file/fd.c.

Regards
MauMau

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers