Storage location of temporary files

From: Christian Schröder <cs(at)deriva(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Storage location of temporary files
Date: 2008-10-31 08:01:29
Message-ID: 490ABB59.4090102@deriva.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi list,
I want to optimize the performance of our PostgreSQL 8.2 server. Up to
now the server has a raid1 where the whole database is located
(including tha WAL files). We will now move the database to a raid5
(which should be faster than the raid1) and will also move the WAL to a
separate disk (which should, according to the docs, also increase the
performance).
But I see the temporary files as another important performance
bottleneck. From the docs (chapter 17.4.1):

work_mem (integer)
Specifies the amount of memory to be used by internal sort
operations and hash tables before switching to temporary disk files.
[...]

We have rather complex queries and as I far as I see from the disk usage
patterns the system makes use of temporary disk files. So I would like
to use a faster disk for these temporary files, too, but I could not
find where the temporary files are located. Is there a separate
directory? I have found a "pgsql_tmp" directory inside of the database
directories ("base/<oid>/pgsql_tmp"). Is this what I'm looking for?
Thanks for your help!

Regards,
Christian

--
Deriva GmbH Tel.: +49 551 489500-42
Financial IT and Consulting Fax: +49 551 489500-91
Hans-Böckler-Straße 2 http://www.deriva.de
D-37079 Göttingen

Deriva CA Certificate: http://www.deriva.de/deriva-ca.cer

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Schröder 2008-10-31 08:13:17 Re: Storage location of temporary files
Previous Message Craig Ringer 2008-10-31 08:00:08 Re: Decreasing WAL size effects